aics-int / napari-allencell-annotator

Other
0 stars 1 forks source link

Fix when user cancels csv/json import #99

Open memeramita opened 2 months ago

memeramita commented 2 months ago

Issue

When the user clicks Import Template and then cancels, the annotation window tries to render empty annotations, resulting in the Clear, Edit, Save, and Start buttons showing up. I don't think this is what we want since we do not have any annotations. The plugin should do nothing when the user cancels importing a template.

Steps to reproduce

Click the Import Template button and click Cancel.

Possible Fix

The file_selected signal in _select_csv_or_json() in file_input.py should not be emitted when the user doesn't select a file, similar to how it is handled in _select_dir().