mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 11:41:49 +02:00
fix(image_widget): image_widget autorange fixed
This commit is contained in:
@ -66,7 +66,7 @@ class BECImageWidget(BECWidget, QWidget):
|
||||
"monitor": DeviceSelectionAction(
|
||||
"Monitor:", DeviceComboBox(device_filter="Device")
|
||||
),
|
||||
"connect": IconAction(icon_path="connection.svg", tooltip="Connect Motors"),
|
||||
"connect": IconAction(icon_path="connection.svg", tooltip="Connect Device"),
|
||||
"separator_0": SeparatorAction(),
|
||||
"save": IconAction(icon_path="save.svg", tooltip="Open Export Dialog"),
|
||||
"separator_1": SeparatorAction(),
|
||||
@ -382,8 +382,7 @@ class BECImageWidget(BECWidget, QWidget):
|
||||
"""
|
||||
Set the auto range of the plot widget from the toolbar.
|
||||
"""
|
||||
checked = self.toolbar.widgets["auto_range"].action.isChecked()
|
||||
self._image.set_auto_range(checked, "xy")
|
||||
self._image.set_auto_range(True, "xy")
|
||||
|
||||
@SafeSlot()
|
||||
def toggle_fft(self):
|
||||
|
@ -83,8 +83,7 @@ def test_image_toolbar_rectangle_mode_action_triggered(image_widget, qtbot):
|
||||
def test_image_toolbar_auto_range(image_widget, mock_image):
|
||||
action = image_widget.toolbar.widgets["auto_range"].action
|
||||
action.trigger()
|
||||
assert action.isChecked() == False
|
||||
image_widget._image.set_auto_range.assert_called_once_with(False, "xy")
|
||||
image_widget._image.set_auto_range.assert_called_once_with(True, "xy")
|
||||
|
||||
|
||||
def test_image_toolbar_enable_mouse_pan_mode(qtbot, image_widget):
|
||||
|
Reference in New Issue
Block a user