Skip to content

Commit

Permalink
ColorChooser : Optimize color field redraws
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmehl committed Nov 13, 2024
1 parent a72e68e commit a3d6614
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/GafferUI/ColorChooser.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,11 @@ def __setColorInternal( self, color, staticComponent, reason ) :
return

zIndex = self.__zIndex()
if color[zIndex] != self.__color[zIndex] or staticComponent != self.__staticComponent :
if (
staticComponent != self.__staticComponent or
( self.__dynamicBackground and color[zIndex] != self.__color[zIndex] ) or
( not self.__dynamicBackground and staticComponent == "h" )
) :
self.__colorFieldToDraw = None

self.__color = color
Expand Down

0 comments on commit a3d6614

Please sign in to comment.