Skip to content

Commit

Permalink
Fix scroll bar position from jumping back to the top (#984)
Browse files Browse the repository at this point in the history
  • Loading branch information
roulaoregan-spi committed Jul 29, 2021
1 parent f0b64ec commit 02456f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cuegui/cuegui/JobMonitorTree.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def _processUpdate(self, work, rpcObjects):

self._itemsLock.lockForWrite()

# include rpcObjects from self._items that are not in jobObjects
# include rpcObjects from self._items that are not in rpcObjects
for proxy, item in list(self._items.items()):
if not proxy in rpcObjects:
rpcObjects[proxy] = item.rpcObject
Expand All @@ -435,7 +435,7 @@ def _processUpdate(self, work, rpcObjects):
if proxy in self.__userColors:
self._items[proxy].setUserColor(self.__userColors[proxy])

self.verticalScrollBar().setValue(scrolled)
self.verticalScrollBar().setRange(scrolled, len(rpcObjects.keys()) - scrolled)
list(map(lambda key: self._items[key].setSelected(True),
[key for key in selectedKeys if key in self._items]))

Expand Down

0 comments on commit 02456f5

Please sign in to comment.