Skip to content

Commit

Permalink
Revert "fixup! LabelPlugValueWidget : Don't indent output plugs"
Browse files Browse the repository at this point in the history
This reverts commit f0a7b493a4383d218bf38a7c9367714e83463a88.
  • Loading branch information
ericmehl committed Mar 27, 2024
1 parent c222cb5 commit 9faaab1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions python/GafferUI/LabelPlugValueWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 ) :

Expand Down

0 comments on commit 9faaab1

Please sign in to comment.