Skip to content

Commit

Permalink
Newer versions of pyside2 are not as aggressive in finding overloads
Browse files Browse the repository at this point in the history
in ancestor classes.  Specify precisely which ancestor overload of
update() we want to call.

(Internal change: 2005289)
  • Loading branch information
spiffmon authored and pixar-oss committed Sep 20, 2019
1 parent 3db6c54 commit 980cc57
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pxr/usdImaging/lib/usdviewq/primTreeWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,11 @@ def updateSelection(self, added, removed):
for item in removed:
item.setSelected(False)
self._refreshAncestorsOfSelected()
self.update()
# This is a big hammer... if we instead built up a list of the
# ModelIndices of all the changed ancestors, we could instead make
# our selectionModel emit selectionChanged for just those items,
# instead. Does not currently seem to be impacting interactivity.
QtWidgets.QWidget.update(self)

def _resetAncestorsOfSelected(self):
for item in self._ancestorsOfSelected:
Expand All @@ -504,4 +508,4 @@ def _refreshAncestorsOfSelected(self):
while item.parent():
item.parent().ancestorOfSelected = True
self._ancestorsOfSelected.append(item.parent())
item = item.parent()
item = item.parent()

0 comments on commit 980cc57

Please sign in to comment.