From 488d5b7e7457166fd1af76fc7f983181eea61421 Mon Sep 17 00:00:00 2001 From: Akshar Sarvesh Date: Mon, 5 Aug 2024 11:43:28 -0700 Subject: [PATCH 1/2] FIX: Switching Y Axis orientation was not properly updating --- pydm/widgets/axis_table_model.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pydm/widgets/axis_table_model.py b/pydm/widgets/axis_table_model.py index e1cbf4974..ed28610f6 100644 --- a/pydm/widgets/axis_table_model.py +++ b/pydm/widgets/axis_table_model.py @@ -97,6 +97,8 @@ def set_data(self, column_name, axis, value): axis.orientation = "left" # The PyQtGraph default is the left axis else: axis.orientation = str(value) + self.plot.plotItem.rebuildLayout() + axis.show() elif column_name == "Y-Axis Label": axis.label_text = str(value) elif column_name == "Min Y Range": From a9b1668f7ac5f7cd7c426e4191daabfef1b7ae2d Mon Sep 17 00:00:00 2001 From: Akshar Sarvesh Date: Mon, 5 Aug 2024 15:46:44 -0700 Subject: [PATCH 2/2] FIX: Only show axes that are already being shown --- pydm/widgets/axis_table_model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pydm/widgets/axis_table_model.py b/pydm/widgets/axis_table_model.py index ed28610f6..9358d553c 100644 --- a/pydm/widgets/axis_table_model.py +++ b/pydm/widgets/axis_table_model.py @@ -98,7 +98,8 @@ def set_data(self, column_name, axis, value): else: axis.orientation = str(value) self.plot.plotItem.rebuildLayout() - axis.show() + if axis.isVisible(): + axis.show() elif column_name == "Y-Axis Label": axis.label_text = str(value) elif column_name == "Min Y Range":