summaryrefslogtreecommitdiff
path: root/DockWidgets/DockWidgetCompressorExpander.py
diff options
context:
space:
mode:
Diffstat (limited to 'DockWidgets/DockWidgetCompressorExpander.py')
-rw-r--r--DockWidgets/DockWidgetCompressorExpander.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/DockWidgets/DockWidgetCompressorExpander.py b/DockWidgets/DockWidgetCompressorExpander.py
index cd0135c..e8e2b31 100644
--- a/DockWidgets/DockWidgetCompressorExpander.py
+++ b/DockWidgets/DockWidgetCompressorExpander.py
@@ -107,7 +107,9 @@ class DockWidgetCompressorExpander(QDockWidget,ui_dialog):
i.update_tooltip()
except:
pass
-
+ if(self.isVisible()):
+ currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value()
+ self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189)
self.hide()
except Exception as e:
@@ -154,4 +156,4 @@ class DockWidgetCompressorExpander(QDockWidget,ui_dialog):
def closeEvent(self,event):
scrollHVal = self.parent().container.graphics.graphicsView.horizontalScrollBarVal
currentVal = self.parent().container.graphics.graphicsView.horizontalScrollBar().value()
- self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue((scrollHVal+currentVal)/2) \ No newline at end of file
+ self.parent().container.graphics.graphicsView.horizontalScrollBar().setValue(currentVal-189) \ No newline at end of file