mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-15 02:46:57 +01:00
Be careful about infinite recursion when loading a stylesheet that changes the palette.
This commit is contained in:
parent
d6d01618c5
commit
6a74ac4736
@ -90,6 +90,8 @@ void StyleSheetLoader::ReplaceColor(QString* css, const QString& name,
|
||||
bool StyleSheetLoader::eventFilter(QObject* obj, QEvent* event) {
|
||||
if (event->type() != QEvent::PaletteChange)
|
||||
return false;
|
||||
if (!event->spontaneous()) // Ignore events from our setStyleSheet
|
||||
return false;
|
||||
|
||||
QWidget* widget = qobject_cast<QWidget*>(obj);
|
||||
if (!widget || !filenames_.contains(widget))
|
||||
|
Loading…
Reference in New Issue
Block a user