mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 16:55:36 +08:00
Avoid crash when refreshing style sheet. For some reasons it helps to set and empty stylesheet upfront
This commit is contained in:
@@ -180,6 +180,7 @@ void CSwiftLauncher::init()
|
||||
|
||||
void CSwiftLauncher::initStyleSheet()
|
||||
{
|
||||
if (!sGui || sGui->isShuttingDown()) { return; }
|
||||
const QString s = sGui->getStyleSheetUtility().styles(
|
||||
{
|
||||
CStyleSheetUtility::fileNameFonts(),
|
||||
@@ -187,6 +188,7 @@ void CSwiftLauncher::initStyleSheet()
|
||||
CStyleSheetUtility::fileNameSwiftLauncher()
|
||||
}
|
||||
);
|
||||
this->setStyleSheet(""); // clear, otherwise launcher crashing
|
||||
this->setStyleSheet(s);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user