diff --git a/Changes.md b/Changes.md index 5f7105bb177..ff73e7eb5fe 100644 --- a/Changes.md +++ b/Changes.md @@ -19,6 +19,7 @@ Improvements - EditScope : Added summaries of set membership edits in the NodeEditor. - LightEditor : Mute and solo columns now accurately reflect the presence of the `light:mute` attribute (for the Mute column) and membership in the `soloLights` set (for the Solo column) for all scene locations, not just for lights. - RenderPassEditor : The currently active render pass can now be unset by double clicking on its green dot in the "Active" column. +- HierarchyView, LightEditor, RenderPassEditor, SetEditor : Reduced potential UI stalls when first showing a scene. Fixes ----- diff --git a/python/GafferUI/PathListingWidget.py b/python/GafferUI/PathListingWidget.py index f9c609db281..ea5774c6c4e 100644 --- a/python/GafferUI/PathListingWidget.py +++ b/python/GafferUI/PathListingWidget.py @@ -477,6 +477,9 @@ def __update( self ) : def __dirPath( self ) : p = self.__path.copy() + if not len( p ) : + return p + if p.isLeaf() : # if it's a leaf then take the parent del p[-1] @@ -486,11 +489,10 @@ def __dirPath( self ) : # it's not valid. if we can make it # valid by trimming the last element # then do that - if len( p ) : - pp = p.copy() - del pp[-1] - if pp.isValid() : - p = pp + pp = p.copy() + del pp[-1] + if pp.isValid() : + p = pp else : # it's valid and not a leaf, and # that's what we want.