mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-13 19:21:50 +02:00
fix(setting_widget): added parent kwarg into all settings widgets in plotting framework
This commit is contained in:
@ -213,7 +213,7 @@ class MotorMap(PlotBase):
|
||||
|
||||
def _add_motor_map_settings(self):
|
||||
"""Add the motor map settings to the side panel."""
|
||||
motor_map_settings = MotorMapSettings(target_widget=self, popup=False)
|
||||
motor_map_settings = MotorMapSettings(parent=self, target_widget=self, popup=False)
|
||||
self.side_panel.add_menu(
|
||||
action_id="motor_map_settings",
|
||||
icon_name="settings_brightness",
|
||||
@ -249,7 +249,7 @@ class MotorMap(PlotBase):
|
||||
"""
|
||||
action = self.toolbar.widgets["motor_map_settings"].action
|
||||
if self.motor_map_settings is None or not self.motor_map_settings.isVisible():
|
||||
motor_map_settings = MotorMapSettings(target_widget=self, popup=True)
|
||||
motor_map_settings = MotorMapSettings(parent=self, target_widget=self, popup=True)
|
||||
self.motor_map_settings = SettingsDialog(
|
||||
self,
|
||||
settings_widget=motor_map_settings,
|
||||
|
@ -156,7 +156,7 @@ class MultiWaveform(PlotBase):
|
||||
self.layout_manager.add_widget_relative(
|
||||
self.control_panel, self.round_plot_widget, "bottom"
|
||||
)
|
||||
self.controls = MultiWaveformControlPanel(target_widget=self)
|
||||
self.controls = MultiWaveformControlPanel(parent=self, target_widget=self)
|
||||
self.control_panel.add_menu(
|
||||
action_id="control",
|
||||
icon_name="tune",
|
||||
|
@ -171,7 +171,7 @@ class PlotBase(BECWidget, QWidget):
|
||||
"""Adds multiple menus to the side panel."""
|
||||
# Setting Axis Widget
|
||||
try:
|
||||
axis_setting = AxisSettings(target_widget=self)
|
||||
axis_setting = AxisSettings(parent=self, target_widget=self)
|
||||
self.side_panel.add_menu(
|
||||
action_id="axis",
|
||||
icon_name="settings",
|
||||
@ -200,7 +200,7 @@ class PlotBase(BECWidget, QWidget):
|
||||
"""
|
||||
settings_action = self.toolbar.widgets["axis"].action
|
||||
if self.axis_settings_dialog is None or not self.axis_settings_dialog.isVisible():
|
||||
axis_setting = AxisSettings(target_widget=self, popup=True)
|
||||
axis_setting = AxisSettings(parent=self, target_widget=self, popup=True)
|
||||
self.axis_settings_dialog = SettingsDialog(
|
||||
self, settings_widget=axis_setting, window_title="Axis Settings", modal=False
|
||||
)
|
||||
|
@ -142,7 +142,7 @@ class ScatterWaveform(PlotBase):
|
||||
Initialize the scatter curve settings menu.
|
||||
"""
|
||||
|
||||
scatter_curve_settings = ScatterCurveSettings(target_widget=self, popup=False)
|
||||
scatter_curve_settings = ScatterCurveSettings(parent=self, target_widget=self, popup=False)
|
||||
self.side_panel.add_menu(
|
||||
action_id="scatter_curve",
|
||||
icon_name="scatter_plot",
|
||||
@ -178,7 +178,7 @@ class ScatterWaveform(PlotBase):
|
||||
"""
|
||||
scatter_settings_action = self.toolbar.widgets["scatter_waveform_settings"].action
|
||||
if self.scatter_dialog is None or not self.scatter_dialog.isVisible():
|
||||
scatter_settings = ScatterCurveSettings(target_widget=self, popup=True)
|
||||
scatter_settings = ScatterCurveSettings(parent=self, target_widget=self, popup=True)
|
||||
self.scatter_dialog = SettingsDialog(
|
||||
self,
|
||||
settings_widget=scatter_settings,
|
||||
|
@ -260,7 +260,7 @@ class Waveform(PlotBase):
|
||||
curve_action = self.toolbar.widgets["curve"].action
|
||||
|
||||
if self.curve_settings_dialog is None or not self.curve_settings_dialog.isVisible():
|
||||
curve_setting = CurveSetting(target_widget=self)
|
||||
curve_setting = CurveSetting(parent=self, target_widget=self)
|
||||
self.curve_settings_dialog = SettingsDialog(
|
||||
self, settings_widget=curve_setting, window_title="Curve Settings", modal=False
|
||||
)
|
||||
|
Reference in New Issue
Block a user