mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Avoid crash when refreshing style sheet. For some reasons it helps to set and empty stylesheet upfront
This commit is contained in:
@@ -78,13 +78,14 @@ CSwiftCore::~CSwiftCore()
|
||||
|
||||
void CSwiftCore::initStyleSheet()
|
||||
{
|
||||
if (!sGui || sGui->isShuttingDown()) { return; }
|
||||
const QString s = sGui->getStyleSheetUtility().styles(
|
||||
{
|
||||
CStyleSheetUtility::fileNameFonts(),
|
||||
CStyleSheetUtility::fileNameStandardWidget(),
|
||||
CStyleSheetUtility::fileNameSwiftCore()
|
||||
}
|
||||
);
|
||||
});
|
||||
this->setStyleSheet(""); // avoid crash, need to reset before
|
||||
this->setStyleSheet(s);
|
||||
}
|
||||
|
||||
@@ -104,7 +105,7 @@ void CSwiftCore::showSettingsDialog()
|
||||
|
||||
void CSwiftCore::showRawFsdMessageDialog()
|
||||
{
|
||||
if(!m_rawFsdMessageDialog)
|
||||
if (!m_rawFsdMessageDialog)
|
||||
{
|
||||
m_rawFsdMessageDialog.reset(new CRawFsdMessagesDialog(this));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user