From 25f1bc488f68395390a3a87328b31dfa7deac11c Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Wed, 27 May 2020 14:00:47 +0200 Subject: 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 --- desktop-widgets/divelistview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'desktop-widgets/divelistview.cpp') 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) -- cgit v1.2.3-70-g09d2