mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: un-singletonize ShiftTimesDialog
There is no reason that this dialog is a singleton. Since it is modal, it can be created on demand. Apart from removing superfluous global state, this simplifies code, because preparing the widget can now be done in the constructor instead of overriding the showEvent() function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
25f1bc488f
commit
7417f865cd
3 changed files with 3 additions and 13 deletions
|
@ -860,7 +860,8 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event)
|
|||
|
||||
void DiveListView::shiftTimes()
|
||||
{
|
||||
ShiftTimesDialog::instance()->show();
|
||||
ShiftTimesDialog dialog(MainWindow::instance());
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
void DiveListView::loadImages()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue