Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PathListingWidget : Avoid blocking UI in setPath( rootPath ) #5948

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -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
-----
12 changes: 7 additions & 5 deletions python/GafferUI/PathListingWidget.py
Original file line number Diff line number Diff line change
@@ -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.