[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 b6e7c38971
commit 1f1551bb5e
2 changed files with 4 additions and 2 deletions

View File

@@ -338,9 +338,10 @@ QPixmap BitmapFactoryInst::pixmapFromSvg(const QByteArray& originalContents, con
QPainter p(&image);
// 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);
QSvgRenderer svg(contents);
Base::Console().SetEnabledMsgType("ReportOutput", Base::ConsoleSingleton::MsgType_Wrn, true);
Base::Console().SetEnabledMsgType("ReportOutput", Base::ConsoleSingleton::MsgType_Wrn, tmp);
svg.render(&p);
p.end();