[BUGFIX] Gui: correctly save and restore warning type enabling in report view

This commit is contained in:
0penBrain
2022-06-15 12:13:40 +02:00
committed by wwmayer
parent 8f4a982696
commit 3fe4e4b6a6
2 changed files with 4 additions and 2 deletions

View File

@@ -1414,10 +1414,11 @@ void MainWindow::loadWindowSettings()
this->move(pos);
// tmp. disable the report window to suppress some bothering warnings
auto tmp = Base::Console().IsMsgTypeEnabled("ReportOutput", Base::ConsoleSingleton::MsgType_Wrn);
Base::Console().SetEnabledMsgType("ReportOutput", Base::ConsoleSingleton::MsgType_Wrn, false);
this->restoreState(config.value(QString::fromLatin1("MainWindowState")).toByteArray());
std::clog << "Main window restored" << std::endl;
Base::Console().SetEnabledMsgType("ReportOutput", Base::ConsoleSingleton::MsgType_Wrn, true);
Base::Console().SetEnabledMsgType("ReportOutput", Base::ConsoleSingleton::MsgType_Wrn, tmp);
bool max = config.value(QString::fromLatin1("Maximized"), false).toBool();
max ? showMaximized() : show();