Attempt to fix crash in setStyleSheet()

This commit is contained in:
Jonas Kvinge
2018-10-26 20:05:37 +02:00
parent 3fe92a62ac
commit 2ba350f76f
4 changed files with 11 additions and 8 deletions

View File

@@ -857,7 +857,9 @@ void MainWindow::ReloadAllSettings() {
}
void MainWindow::RefreshStyleSheet() {
setStyleSheet(styleSheet());
QString contents(styleSheet());
setStyleSheet("");
setStyleSheet(contents);
}
void MainWindow::MediaStopped() {

View File

@@ -93,6 +93,7 @@ void StyleSheetLoader::UpdateStyleSheet(QWidget *widget) {
contents.replace("macos", "*");
#endif
widget->setStyleSheet("");
widget->setStyleSheet(contents);
}