GUI crashes if stylesheet changes, this provides a fix

This commit is contained in:
Klaus Basan
2018-07-31 01:03:39 +02:00
parent 418584c5e3
commit bc39695ecc

View File

@@ -182,6 +182,7 @@ void SwiftGuiStd::init()
void SwiftGuiStd::initStyleSheet()
{
if (!sGui || sGui->isShuttingDown()) { return; }
const QString s = sGui->getStyleSheetUtility().styles(
{
CStyleSheetUtility::fileNameFonts(),
@@ -189,6 +190,7 @@ void SwiftGuiStd::initStyleSheet()
CStyleSheetUtility::fileNameSwiftStandardGui()
}
);
this->setStyleSheet(""); //! \todo KB 2018-07 without clearing the stylesheet I see a crash here for the 2nd update
this->setStyleSheet(s);
}