Skip to content

Commit

Permalink
Center fresh options dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
ckaiser committed Oct 30, 2016
1 parent b3b2762 commit 6db4547
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dialogs/optionsdialog.cpp
Expand Up @@ -453,8 +453,12 @@ bool OptionsDialog::event(QEvent *event)
event->ignore();
return false;
}
} else if (event->type() == QEvent::Show && settings()->contains("geometry/optionsDialog")) {
restoreGeometry(settings()->value("geometry/optionsDialog").toByteArray());
} else if (event->type() == QEvent::Show) {
if (settings()->contains("geometry/optionsDialog")) {
restoreGeometry(settings()->value("geometry/optionsDialog").toByteArray());
} else {
move(QApplication::desktop()->screenGeometry(this).center() - rect().center());
}
}

return QDialog::event(event);
Expand Down

0 comments on commit 6db4547

Please sign in to comment.