diff --git a/python/GafferUI/LabelPlugValueWidget.py b/python/GafferUI/LabelPlugValueWidget.py index 531feaa670f..f55816ca71a 100644 --- a/python/GafferUI/LabelPlugValueWidget.py +++ b/python/GafferUI/LabelPlugValueWidget.py @@ -65,8 +65,6 @@ def __init__( self, plug, horizontalAlignment=GafferUI.Label.HorizontalAlignment formatter = self.__formatter, ) self.__label._qtWidget().setObjectName( "gafferPlugLabel" ) - if any( p.direction() == Gaffer.Plug.Direction.In for p in self.getPlugs() ) : - self.__label._qtWidget().setProperty( "gafferValueChanged", GafferUI._Variant.toVariant( False ) ) # Fix the height to match common PlugValueWidgets, so that our text # aligns nicely with theirs. Ideally this should be done purely in the # stylesheet, but that has proved difficult. See comments in @@ -162,12 +160,15 @@ def _hasUserValue( plug ) : # Sets whether or not the label be rendered in a ValueChanged state. def __setValueChanged( self, valueChanged ) : - currentValueChanged = self.__getValueChanged() - if currentValueChanged is None or valueChanged == currentValueChanged : + if any( p.direction() == Gaffer.Plug.Direction.Out for p in self.getPlugs() ) : + return + + if valueChanged == self.__getValueChanged() : return self.__label._qtWidget().setProperty( "gafferValueChanged", GafferUI._Variant.toVariant( valueChanged ) ) self.__label._repolish() + self.__label._setStyleSheet() def __getValueChanged( self ) :