Permalink
Browse files

Center fresh options dialog

  • Loading branch information...
1 parent b3b2762 commit 6db4547493c4114bb799d9fe6508f35daed23884 @ckaiser committed Oct 30, 2016
Showing with 6 additions and 2 deletions.
  1. +6 −2 dialogs/optionsdialog.cpp
@@ -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);

0 comments on commit 6db4547

Please sign in to comment.