Skip to content

Commit

Permalink
ColorChooser._ColorField : changesShouldBeMerged
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmehl committed Jul 5, 2024
1 parent 38aac34 commit aef4b24
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions python/GafferUI/ColorChooser.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,16 @@ def valueChangedSignal( self ) :
@classmethod
def changesShouldBeMerged( cls, firstReason, secondReason ) :

# \todo Implement me
pass
if type( firstReason ) != type( secondReason ) :
return False

return ( firstReason, secondReason ) in (
# click and drag
( cls.ValueChangedReason.Click, cls.ValueChangedReason.DragBegin ),
( cls.ValueChangedReason.DragBegin, cls.ValueChangedReason.DragMove ),
( cls.ValueChangedReason.DragMove, cls.ValueChangedReason.DragMove ),
( cls.ValueChangedReason.DragMove, cls.ValueChangedReason.DragEnd ),
)

def __setColorInternal( self, color, reason ) :

Expand Down

0 comments on commit aef4b24

Please sign in to comment.