diff --git a/Changes.md b/Changes.md index 116409cbdea..1b927f28753 100644 --- a/Changes.md +++ b/Changes.md @@ -24,6 +24,7 @@ Fixes - Fixed error when trying to visualise data unsupported data. - TweakPlug : Fixed preservation of geometric interpretation when tweaking V3f values. - ApplicationTest : Extended grace period when testing process name on slower hosts. +- OpDialogue : Fixed `DefaultButton` handling. API --- diff --git a/python/GafferCortexUI/OpDialogue.py b/python/GafferCortexUI/OpDialogue.py index 3991572113c..0f7dac9a3a3 100644 --- a/python/GafferCortexUI/OpDialogue.py +++ b/python/GafferCortexUI/OpDialogue.py @@ -464,11 +464,16 @@ def __focusDefaultButton( self ) : with IECore.IgnoredExceptions( KeyError ) : d = self.__node.getParameterised()[0].userData()["UI"]["defaultButton"] if d is not None : - for v in self.DefaultButton.values() : + for v in self.DefaultButton : if str( v ).lower() == d.value.lower() : defaultButton = v break + # backwards compatibility for IECore.Enum() + if str( v ).lower() == f"DefaultButton.{d.value}".lower() : + defaultButton = v + break + if defaultButton == self.DefaultButton.None_ : self._qtWidget().setFocus() elif defaultButton == self.DefaultButton.Cancel :