Skip to content

Commit

Permalink
Fix to prevent crash when adjusting cell-count pixel/um ratio without…
Browse files Browse the repository at this point in the history
… loading an image first. (#263)
  • Loading branch information
jmcoreymv authored Sep 6, 2023
1 parent 7326e4a commit e8bef95
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lumaviewpro.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ def __init__(self, **kwargs):
super().__init__(**kwargs)
logger.info('LVP Main: CellCountPopup.__init__()')
self._preview_source_image = None
self._preview_image = None
self._post = None
self._post = post_processing.PostProcessing()
self._settings = self._get_init_settings()
Expand Down Expand Up @@ -851,6 +852,9 @@ def _validate(value_str):
if not valid:
return

if self._preview_image is None:
return

self._settings['context']['pixels_per_um'] = value
self.update_filter_max(image=self._preview_image)

Expand Down

0 comments on commit e8bef95

Please sign in to comment.