diff --git a/CHANGELOG.md b/CHANGELOG.md index b3e7bd37..5fa9ec7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - fixed issue with displaying box config [#2111](https://github.com/sandboxie-plus/Sandboxie/issues/2111) +- fixed flashign when switching views [#2050](https://github.com/sandboxie-plus/Sandboxie/issues/2050) diff --git a/SandboxiePlus/SandMan/SandMan.cpp b/SandboxiePlus/SandMan/SandMan.cpp index 33f3c23f..0a3250f5 100644 --- a/SandboxiePlus/SandMan/SandMan.cpp +++ b/SandboxiePlus/SandMan/SandMan.cpp @@ -269,11 +269,13 @@ CSandMan::~CSandMan() theGUI = NULL; } -void CSandMan::LoadState() +void CSandMan::LoadState(bool bFull) { - setWindowState(Qt::WindowNoState); - restoreGeometry(theConf->GetBlob("MainWindow/Window_Geometry")); - restoreState(theConf->GetBlob("MainWindow/Window_State")); + if (bFull) { + setWindowState(Qt::WindowNoState); + restoreGeometry(theConf->GetBlob("MainWindow/Window_Geometry")); + restoreState(theConf->GetBlob("MainWindow/Window_State")); + } //m_pBoxTree->restoreState(theConf->GetBlob("MainWindow/BoxTree_Columns")); if(m_pMessageLog) m_pMessageLog->GetView()->header()->restoreState(theConf->GetBlob("MainWindow/LogList_Columns")); @@ -2157,10 +2159,11 @@ void CSandMan::OnAlwaysTop() bool bAlwaysOnTop = m_pWndTopMost->isChecked(); theConf->SetValue("Options/AlwaysOnTop", bAlwaysOnTop); this->setWindowFlag(Qt::WindowStaysOnTopHint, bAlwaysOnTop); - this->show(); // why is this needed? + LoadState(); + SafeShow(this); // why is this needed? + m_pPopUpWindow->setWindowFlag(Qt::WindowStaysOnTopHint, bAlwaysOnTop); m_pProgressDialog->setWindowFlag(Qt::WindowStaysOnTopHint, bAlwaysOnTop); - LoadState(); } void CSandMan::OnRefresh() @@ -2279,17 +2282,16 @@ void CSandMan::UpdateSettings(bool bRebuildUI) m_pMainWidget->deleteLater(); m_pMainWidget = new QWidget(this); + setCentralWidget(m_pMainWidget); m_pLabel->deleteLater(); CreateUI(); - setCentralWidget(m_pMainWidget); - m_pTrayMenu->deleteLater(); CreateTrayMenu(); - LoadState(); + LoadState(false); GetBoxView()->ReloadUserConfig(); diff --git a/SandboxiePlus/SandMan/SandMan.h b/SandboxiePlus/SandMan/SandMan.h index 86b3f61f..303105de 100644 --- a/SandboxiePlus/SandMan/SandMan.h +++ b/SandboxiePlus/SandMan/SandMan.h @@ -232,7 +232,7 @@ private: void HandleMaintenance(SB_RESULT(void*) Status); - void LoadState(); + void LoadState(bool bFull = true); void StoreState(); QWidget* m_pMainWidget;