Skip to content

Commit

Permalink
[fix] gui SPARC alignment tab: update mirror shape whenever needed
Browse files Browse the repository at this point in the history
Mirror shape depends on 4 properties => listen to all of them, to
request an update of the shape.
  • Loading branch information
pieleric committed Dec 17, 2024
1 parent dd5d4cf commit 00e1397
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/odemis/gui/cont/tabs/sparc2_align_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,9 @@ def add_axis(axisname, comp, label=None):
self.mirror_ol = self.panel.vp_align_center.mirror_ol
self.lens = main_data.lens
self.lens.focusDistance.subscribe(self._onMirrorDimensions, init=True)
self.lens.holeDiameter.subscribe(self._onMirrorDimensions)
self.lens.parabolaF.subscribe(self._onMirrorDimensions)
self.lens.xMax.subscribe(self._onMirrorDimensions)
self.mirror_ol.set_hole_position(tab_data.polePositionPhysical)
self.panel.vp_align_center.show_mirror_overlay()

Expand Down Expand Up @@ -1921,7 +1924,7 @@ def _updateMoIValues(self, moi, ss):
self._txt_ss.SetValue(u"%.4f %%" % (ss * 100,))

@call_in_wx_main
def _onMirrorDimensions(self, focusDistance):
def _onMirrorDimensions(self, _):
try:
self.mirror_ol.set_mirror_dimensions(self.lens.parabolaF.value,
self.lens.xMax.value,
Expand Down

0 comments on commit 00e1397

Please sign in to comment.