0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 11:41:49 +02:00

fix(plot_base): do not enable inner axes when label is changed

This commit is contained in:
2025-03-18 15:01:19 +01:00
parent 35ebd19062
commit d9de75bbfa

View File

@ -471,6 +471,7 @@ class PlotBase(BECWidget, QWidget):
the combined label. Called whenever user label or suffix changes.
"""
final_label = self.x_label_combined
if self.plot_item.getAxis("bottom").isVisible():
self.plot_item.setLabel("bottom", text=final_label)
@SafeProperty(str, doc="The text of the y label")
@ -518,6 +519,7 @@ class PlotBase(BECWidget, QWidget):
the combined y label. Called whenever y label or suffix changes.
"""
final_label = self.y_label_combined
if self.plot_item.getAxis("bottom").isVisible():
self.plot_item.setLabel("left", text=final_label)
def _tuple_to_qpointf(self, tuple: tuple | list):
@ -798,6 +800,8 @@ class PlotBase(BECWidget, QWidget):
"""
self.plot_item.showAxis("bottom", value)
self.plot_item.showAxis("left", value)
self._apply_x_label()
self._apply_y_label()
self.property_changed.emit("inner_axes", value)
@SafeProperty(bool, doc="Lock aspect ratio of the plot widget.")