diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-02-27 22:08:20 +0100 |
---|---|---|
committer | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-07 00:13:35 +0200 |
commit | 6288b2a61915b36563f2415e8abadd2f5cc57424 (patch) | |
tree | 0b20bb98c7f619778f485cd5c2b45ee1011c3d20 /desktop-widgets/tab-widgets | |
parent | ee64a85d2e97c7f3d20de364ac908ac16fbfbc7a (diff) | |
download | subsurface-6288b2a61915b36563f2415e8abadd2f5cc57424.tar.gz |
cleanup: remove strange recursive code in MainTab::enableEdition
When enableEdition() was called with mode == NONE and the dive
was a manually added dive, it would call into MainWindow::
editCurrentDive(), which would in turn call enableEdition(),
however with another mode. Since the only caller of
enableEdition() is now editCurrentDive() anyway, we can
remove that weird code.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/tab-widgets')
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index bd3919b24..7bc04e7a7 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -210,21 +210,6 @@ void MainTab::enableEdition(EditMode newEditMode) { if (((newEditMode == DIVE || newEditMode == NONE) && current_dive == NULL) || editMode != NONE) return; - if ((newEditMode == DIVE || newEditMode == NONE) && - current_dive->dc.model && - strcmp(current_dive->dc.model, "manually added dive") == 0) { - // editCurrentDive will call enableEdition with newEditMode == MANUALLY_ADDED_DIVE - // so exit this function here after editCurrentDive() returns - - - - // FIXME : can we get rid of this recursive crap? - - - - MainWindow::instance()->editCurrentDive(); - return; - } ui.editDiveSiteButton->setEnabled(false); MainWindow::instance()->diveList->setEnabled(false); |