diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-08-16 07:03:52 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-08-16 07:03:52 -0400 |
| commit | 3f487a5a6c9c23824298fdde3d76dc82edf3ca46 (patch) | |
| tree | 62e1ef5285c026c9959ccd430382b4f33e174d1f /src/nxmaccessmanager.cpp | |
| parent | 799ddb1b2477434252d06975fd4c68106dc3826f (diff) | |
merged toolbars into restoreToolbars() and saveToolbars()
added centerOnMainWindowMonitor(), now also used by validation dialog
added overloads for splitter, used by main splitter
fixed saveState() for QMainWindow calling the wrong function
Diffstat (limited to 'src/nxmaccessmanager.cpp')
| -rw-r--r-- | src/nxmaccessmanager.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/nxmaccessmanager.cpp b/src/nxmaccessmanager.cpp index fd1dc0c1..16190ca4 100644 --- a/src/nxmaccessmanager.cpp +++ b/src/nxmaccessmanager.cpp @@ -48,8 +48,9 @@ const QString NexusSSO("wss://sso.nexusmods.com"); const QString NexusSSOPage("https://www.nexusmods.com/sso?id=%1&application=modorganizer2"); -ValidationProgressDialog::ValidationProgressDialog(std::chrono::seconds t) - : m_timeout(t), m_bar(nullptr), m_buttons(nullptr), m_timer(nullptr) +ValidationProgressDialog::ValidationProgressDialog(std::chrono::seconds t) : + m_timeout(t), m_bar(nullptr), m_buttons(nullptr), m_timer(nullptr), + m_first(true) { m_bar = new QProgressBar; m_bar->setTextVisible(false); @@ -103,6 +104,14 @@ void ValidationProgressDialog::stop() hide(); } +void ValidationProgressDialog::showEvent(QShowEvent* e) +{ + if (m_first) { + Settings::instance().geometry().centerOnMainWindowMonitor(this); + m_first = false; + } +} + void ValidationProgressDialog::closeEvent(QCloseEvent* e) { hide(); |
