From 7dbb6b0e06281f37eff2179202a2ebdaf0fc2905 Mon Sep 17 00:00:00 2001 From: brenda-br Date: Thu, 19 Jan 2023 04:12:17 +0530 Subject: Fix #32 Simulation Window Stopped Shifting after closing Dock Widgets --- DockWidgets/DockWidgetCompoundSeparator.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'DockWidgets/DockWidgetCompoundSeparator.py') diff --git a/DockWidgets/DockWidgetCompoundSeparator.py b/DockWidgets/DockWidgetCompoundSeparator.py index 5a80f84..69b2770 100644 --- a/DockWidgets/DockWidgetCompoundSeparator.py +++ b/DockWidgets/DockWidgetCompoundSeparator.py @@ -97,3 +97,7 @@ class DockWidgetCompoundSeparator(QDockWidget,ui_dialog): except Exception as e: print(e) + 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 -- cgit