aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/divelistview.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-05-27 14:00:47 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-05-27 09:47:35 -0700
commit25f1bc488f68395390a3a87328b31dfa7deac11c (patch)
tree7ed5f8806a5b6ba38607b17d441ca4f90ef7e7e6 /desktop-widgets/divelistview.cpp
parent79f90effe97daf1a619941dec50eddebcddc6fa6 (diff)
downloadsubsurface-25f1bc488f68395390a3a87328b31dfa7deac11c.tar.gz
cleanup: un-singletonize RenumberDialog
There is no reason that this dialog is a singleton. Since it is modal, it can be created on demand. This simplifies code, because the mode (selected-only or all-dives) can be set in the constructor. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/divelistview.cpp')
-rw-r--r--desktop-widgets/divelistview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp
index a47c05b67..6d41c7ff1 100644
--- a/desktop-widgets/divelistview.cpp
+++ b/desktop-widgets/divelistview.cpp
@@ -647,8 +647,8 @@ void DiveListView::splitDives()
void DiveListView::renumberDives()
{
- RenumberDialog::instance()->renumberOnlySelected();
- RenumberDialog::instance()->show();
+ RenumberDialog dialog(true, MainWindow::instance());
+ dialog.exec();
}
void DiveListView::merge_trip(const QModelIndex &a, int offset)