Skip to content

Commit 0aac96a

Browse files
committed
Ensure focus mode is disabled after calibration
There were a few situations where focus mode was still enabled after calibration. This is very bad, as the users cannot interact with the GUI anymore if focus mode is enabled. Ensure focus mode is disabled after calibration. Fixes: #1556 Signed-off-by: Patrick Avery <[email protected]>
1 parent b85af6e commit 0aac96a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

hexrd/ui/calibration/calibration_runner.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,11 @@ def run_calibration(self):
410410
# In case any overlays changed
411411
HexrdConfig().overlay_config_changed.emit()
412412
HexrdConfig().update_overlay_editor.emit()
413+
414+
# Focus mode should definitely not be enabled at this point,
415+
# but let's be extra careful and make sure it is disabled.
416+
self.enable_focus_mode(False)
417+
413418
self.finished.emit()
414419

415420
def write_instrument_to_hexrd_config(self, instr):
@@ -648,8 +653,9 @@ def disable_line_picker(self, b=True):
648653
if self.line_picker:
649654
self.line_picker.disabled = b
650655
self.line_picker.ui.setVisible(not b)
656+
651657
# Make sure focus mode is enabled while the line picker is visible
652-
self.enable_focus_mode(True)
658+
self.enable_focus_mode(not b)
653659

654660
def enable_line_picker(self):
655661
self.disable_line_picker(False)

0 commit comments

Comments
 (0)