Cleanup: Remove MainTab::getEditMode() function

The only caller of said function used to check whether MainTab is
in edit mode. For this case there is already a function - use that
instead.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-04-13 15:41:47 +02:00 committed by Dirk Hohndel
parent 88dc32fdfc
commit 4bb002d137
3 changed files with 1 additions and 7 deletions

View file

@ -404,7 +404,7 @@ void MainWindow::enableDisableOtherDCsActions()
void MainWindow::setDefaultState() void MainWindow::setDefaultState()
{ {
setApplicationState("Default"); setApplicationState("Default");
if (mainTab->getEditMode() != MainTab::NONE) if (mainTab->isEditing())
ui.bottomLeft->currentWidget()->setEnabled(false); ui.bottomLeft->currentWidget()->setEnabled(false);
} }

View file

@ -704,11 +704,6 @@ void MainTab::reload()
mark_divelist_changed(true); \ mark_divelist_changed(true); \
} while (0) } while (0)
MainTab::EditMode MainTab::getEditMode() const
{
return editMode;
}
void MainTab::refreshDisplayedDiveSite() void MainTab::refreshDisplayedDiveSite()
{ {
struct dive_site *ds = get_dive_site_for_dive(current_dive); struct dive_site *ds = get_dive_site_for_dive(current_dive);

View file

@ -97,7 +97,6 @@ slots:
void toggleTriggeredColumn(); void toggleTriggeredColumn();
void updateTextLabels(bool showUnits = true); void updateTextLabels(bool showUnits = true);
void escDetected(void); void escDetected(void);
EditMode getEditMode() const;
private: private:
Ui::MainTab ui; Ui::MainTab ui;
WeightModel *weightModel; WeightModel *weightModel;