mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix widget refresh after stylesheet property clearing
This commit is contained in:
parent
c6bb4414c5
commit
330f2ea62a
@ -191,6 +191,7 @@ void caf::UiStyleSheet::clearWidgetStates(QWidget* widget)
|
||||
{
|
||||
widget->setProperty(existingProperty, QVariant());
|
||||
}
|
||||
refreshWidget(widget);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -209,7 +210,7 @@ void caf::UiStyleSheet::setWidgetState(QWidget* widget, QString stateTag, bool o
|
||||
}
|
||||
|
||||
// Trigger style update
|
||||
this->refreshWidget(widget);
|
||||
refreshWidget(widget);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -229,7 +230,7 @@ QString caf::UiStyleSheet::fullText(const QString& className, const QString& obj
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void caf::UiStyleSheet::refreshWidget(QWidget* widget) const
|
||||
void caf::UiStyleSheet::refreshWidget(QWidget* widget)
|
||||
{
|
||||
widget->style()->unpolish(widget);
|
||||
widget->style()->polish(widget);
|
||||
|
@ -89,7 +89,7 @@ public:
|
||||
|
||||
private:
|
||||
QString fullText(const QString& className, const QString& objectName, bool applyToSubClasses) const;
|
||||
void refreshWidget(QWidget* widget) const;
|
||||
static void refreshWidget(QWidget* widget);
|
||||
|
||||
private:
|
||||
std::map<QString, State> m_states;
|
||||
|
Loading…
Reference in New Issue
Block a user