Skip to content

Commit

Permalink
Connected align apply toolButton and corrected typo on function name.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAntTeam committed Jan 8, 2024
1 parent e6f2898 commit 10238f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/TheAntFarm/controller/controller_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def select_active_gcode(self, gcode_path):
redraw_align = True
else:
logger.debug("Remove ABL")
redraw_align = self.control_controller.renove_alignment(gcode_path)
redraw_align = self.control_controller.remove_alignment(gcode_path)

if abl_val != [] and self.abl_apply_active:
logger.debug("Apply ABL")
Expand Down
7 changes: 7 additions & 0 deletions src/TheAntFarm/ui_manager/ui_align_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@
class UiAlignTab(QObject):
"""Class dedicated to UI <--> Control interactions on Align Tab. """
align_active_s = Signal(bool)
align_apply_s = Signal(bool)
update_threshold_s = Signal(int)

def __init__(self, ui, control_worker):
super(UiAlignTab, self).__init__()
self.ui = ui
self.controlWo = control_worker
self.align_applied = False

# Align TAB related controls.
self.ui.main_tab_widget.currentChanged.connect(self.check_align_is_active)
self.align_active_s.connect(self.controlWo.set_align_is_active)
self.align_apply_s.connect(lambda: self.controlWo.set_align_active(self.align_applied))
self.ui.apply_alignment_tb.clicked.connect(self.apply_align)
self.ui.contrast_slider.valueChanged.connect(self.update_threshold)
self.update_threshold_s.connect(self.controlWo.update_threshold_value)

Expand All @@ -42,6 +46,9 @@ def update_camera_list(self, camera_list):
for cam in camera_list:
self.ui.camera_list_cb.addItem(str(cam))

def apply_align(self):
self.align_apply_s.emit(True)


if __name__ == "__main__":
pass

0 comments on commit 10238f7

Please sign in to comment.