From 63028ee779b7c0ee32a3077c2ae2cc89392d9548 Mon Sep 17 00:00:00 2001 From: Eric Mehl Date: Wed, 23 Oct 2024 17:43:09 -0400 Subject: [PATCH] ColorChooser : Optimize color field redraws --- python/GafferUI/ColorChooser.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/GafferUI/ColorChooser.py b/python/GafferUI/ColorChooser.py index aa01ce5e981..2501ba5510d 100644 --- a/python/GafferUI/ColorChooser.py +++ b/python/GafferUI/ColorChooser.py @@ -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.__dynamicColors and color[zIndex] != self.__color[zIndex] ) or + ( not self.__dynamicColors and staticComponent == "h" ) + ) : self.__colorFieldToDraw = None self.__color = color