diff options
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r-- | qt-ui/maintab.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 5905285fa..3b879133b 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -132,10 +132,12 @@ void MainTab::enableEdition() bool MainTab::eventFilter(QObject* object, QEvent* event) { if (isEnabled() && event->type() == QEvent::FocusIn && (object == ui->rating || object == ui->visibility)){ + tabBar()->setTabIcon(currentIndex(), QIcon(":warning")); enableEdition(); } if (isEnabled() && event->type() == QEvent::MouseButtonPress ) { + tabBar()->setTabIcon(currentIndex(), QIcon(":warning")); enableEdition(); } return false; // don't "eat" the event. @@ -340,7 +342,8 @@ void MainTab::reload() void MainTab::acceptChanges() { mainWindow()->dive_list()->setEnabled(true); - + tabBar()->setTabIcon(0, QIcon()); // Notes + tabBar()->setTabIcon(1, QIcon()); // Equipment ui->diveNotesMessage->animatedHide(); ui->notesButtonBox->hide(); /* now figure out if things have changed */ @@ -388,6 +391,8 @@ void MainTab::acceptChanges() void MainTab::rejectChanges() { + tabBar()->setTabIcon(0, QIcon()); // Notes + tabBar()->setTabIcon(1, QIcon()); // Equipment mainWindow()->dive_list()->setEnabled(true); if (mainWindow() && mainWindow()->dive_list()->selectedTrips.count() == 1){ ui->notes->setText(notesBackup[NULL].notes ); |