Skip to content

Commit

Permalink
Merge pull request #5948 from johnhaddon/pathListingWidgetImprovement
Browse files Browse the repository at this point in the history
PathListingWidget : Avoid blocking UI in `setPath( rootPath )`
  • Loading branch information
johnhaddon authored Jul 9, 2024
2 parents 33bd2e1 + f8add5e commit 36f02ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand Down
12 changes: 7 additions & 5 deletions python/GafferUI/PathListingWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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.
Expand Down

0 comments on commit 36f02ca

Please sign in to comment.