Skip to content

Commit

Permalink
Plan windows no longer enable the run button automatically.
Browse files Browse the repository at this point in the history
The idea is that the QueueButton class will enable/disable these
buttons based on the state of the queueserver. By default, they will
remain disabled until the queueserver is ready.
  • Loading branch information
canismarko committed Jun 13, 2024
1 parent fbe52ec commit 63179ed
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/firefly/plans/line_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def customize_ui(self):
self.ui.num_motor_spin_box.lineEdit().setReadOnly(True)
self.ui.num_motor_spin_box.valueChanged.connect(self.update_regions)

self.ui.run_button.setEnabled(True) # for testing
# Connect signals for executing the plan
self.ui.run_button.clicked.connect(self.queue_plan)

# when selections of detectors changed update_total_time
Expand Down
1 change: 0 additions & 1 deletion src/firefly/plans/move_motor_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def customize_ui(self):
self.ui.num_motor_spin_box.lineEdit().setReadOnly(True)
self.ui.num_motor_spin_box.valueChanged.connect(self.update_regions)

self.ui.run_button.setEnabled(True) # for testing
self.ui.run_button.clicked.connect(self.queue_plan)

def time_converter(self, total_seconds):
Expand Down
1 change: 0 additions & 1 deletion src/firefly/plans/xafs_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ def customize_ui(self):
self.ui.pushButton.clicked.connect(self.reset_default_regions)

# Button to actually execute the plan
self.ui.run_button.setEnabled(True)
self.ui.run_button.clicked.connect(self.queue_plan)

# connect checkboxes with all regions' check box
Expand Down
2 changes: 2 additions & 0 deletions src/firefly/tests/test_xafs_scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def check_item(item):
return True

# Click the run button and see if the plan is queued
display.ui.run_button.setEnabled(True)
with qtbot.waitSignal(
ffapp.queue_item_added, timeout=1000, check_params_cb=check_item
):
Expand Down Expand Up @@ -262,6 +263,7 @@ def check_item(item):
return True

# Click the run button and see if the plan is queued
display.ui.run_button.setEnabled(True)
with qtbot.waitSignal(
ffapp.queue_item_added, timeout=1000, check_params_cb=check_item
):
Expand Down

0 comments on commit 63179ed

Please sign in to comment.