diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-07-30 20:41:33 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-30 12:20:26 -0700 |
commit | 5e1e6110ce50b33e24667ce83ab5d2417a2a466e (patch) | |
tree | 8a5bea4ca9463904b6d4d8b786793d39a8f02dfe /desktop-widgets/mainwindow.h | |
parent | d3f3d82abdaabebf5a8c83a57cc6b9e0b7aab1de (diff) | |
download | subsurface-5e1e6110ce50b33e24667ce83ab5d2417a2a466e.tar.gz |
Cleanup: remove parameter from currentDiveChanged signal
The currentDiveChanged signal was emitted by the DiveListView
to inform the MainWindow of a change of current dive. The
new current dive was passed as a parameter. The slot in MainWindow
then called select_dive() on the dive.
This seems pointless because:
1) In both emits, selected_dive dive was passed as argument. But
MainWindow can read this global variable itself.
2) Calling select_dive() again is a no-op, because obviously,
this already *was* the selected dive.
Moreover it seems conceptually wrong to set the current dive in the
slot that is informed of the change of the current dive.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/mainwindow.h')
-rw-r--r-- | desktop-widgets/mainwindow.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/mainwindow.h b/desktop-widgets/mainwindow.h index ab9ebf316..8c7347fd3 100644 --- a/desktop-widgets/mainwindow.h +++ b/desktop-widgets/mainwindow.h @@ -138,7 +138,7 @@ slots: void on_action_Check_for_Updates_triggered(); void on_actionDiveSiteEdit_triggered(); - void current_dive_changed(int divenr); + void current_dive_changed(); void initialUiSetup(); void on_actionImportDiveLog_triggered(); |