Toggling between mode after deleting the last annotation lead to errors.
Expected behavior
After deleting the last annotation, the interaction should be set to Explore
How to Reproduce
Start cell locator
Select either MNI or CCF
Click on "+" button (Place point)
Add few points, right click
Delete current annotation cilcking on remove button
Selecting any of the mode (Explore, Edit, Place point ) leads to the following error:
Traceback (most recent call last):
File "/path/to/cell-locator-RelWithDebInfo-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/Home.py", line 1592, in handler
self.setInteractionState(state)
File "/path/to/cell-locator-RelWithDebInfo-build/Slicer-build/lib/CellLocator-4.13/qt-scripted-modules/Home.py", line 1539, in setInteractionState
markup = self.Annotations.current.markup
AttributeError: 'NoneType' object has no attribute 'markup'
Environment
Description
Toggling between mode after deleting the last annotation lead to errors.
Expected behavior
After deleting the last annotation, the interaction should be set to
Explore
How to Reproduce