Skip to content

Commit

Permalink
[Centring] - Fixed casing and fixed potential issue with very frequen…
Browse files Browse the repository at this point in the history
…t clicking
  • Loading branch information
marcus-oscarsson committed Oct 17, 2024
1 parent c9eba4a commit dbcdf7f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mxcubeweb/core/components/sampleview.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,13 @@ def abort_centring(self):

def centring_handle_click(self, x, y):
if HWR.beamline.diffractometer.current_centring_procedure:
HWR.beamline.diffractometer.imageClicked(x, y, x, y)
HWR.beamline.diffractometer.image_clicked(x, y, x, y)
self.centring_click()
else:
if not self.centring_clicks_left():
# Number of centring clicks can still be negative if the user
# clicks very frequently on the image, added comparsion with lesser
# then 0 to be able to recover from this scenario.
if self.centring_clicks_left() <= 0:
self.centring_reset_click_count()
HWR.beamline.diffractometer.cancel_centring_method()

Expand Down

0 comments on commit dbcdf7f

Please sign in to comment.