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().
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()
infile_input.py
should not be emitted when the user doesn't select a file, similar to how it is handled in_select_dir()
.