From 0de0b3c22cbb7629185a4a6ffdb0996a26ba771b Mon Sep 17 00:00:00 2001 From: Roula O'Regan Date: Tue, 2 Mar 2021 08:01:44 -0800 Subject: [PATCH 1/2] Fix scroll bar position from jumping back to the top Changed scroll position using the setVerticalBar() .setRange(...) and created a small scroll area between scroll position and the number of jobs monitored. --- cuegui/cuegui/JobMonitorTree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuegui/cuegui/JobMonitorTree.py b/cuegui/cuegui/JobMonitorTree.py index 58773c0ac..13ed6d107 100644 --- a/cuegui/cuegui/JobMonitorTree.py +++ b/cuegui/cuegui/JobMonitorTree.py @@ -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(jobObjects.keys() - scrolled)) list(map(lambda key: self._items[key].setSelected(True), [key for key in selectedKeys if key in self._items])) From 579fb2e0f9a0c8ca71d5c788ab1bffe5746909c5 Mon Sep 17 00:00:00 2001 From: roulaoregan-spi Date: Mon, 19 Jul 2021 11:11:59 -0700 Subject: [PATCH 2/2] Bug fix in variable name rpcObject --- cuegui/cuegui/JobMonitorTree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cuegui/cuegui/JobMonitorTree.py b/cuegui/cuegui/JobMonitorTree.py index 13ed6d107..2e4698e5d 100644 --- a/cuegui/cuegui/JobMonitorTree.py +++ b/cuegui/cuegui/JobMonitorTree.py @@ -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 @@ -435,7 +435,7 @@ def _processUpdate(self, work, rpcObjects): if proxy in self.__userColors: self._items[proxy].setUserColor(self.__userColors[proxy]) - self.verticalScrollBar().setRange(scrolled, len(jobObjects.keys() - 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]))