mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
ee64a85d2e
commit
6288b2a619
1 changed files with 0 additions and 15 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue