BICCN / cell-locator

manually align specimens to annotated 3D spaces
https://cell-locator.readthedocs.io
Other
19 stars 7 forks source link

"New" button removes all objects from the 2D and 3D views. (Slicer 2020) #135

Closed allemangD closed 4 years ago

allemangD commented 4 years ago

Environment

Description

Using the "New" button removes all objects from both the 2D and 3D views, making the app unusable. No prompt is given to select a location, and no error messages appear in the log.

How to Reproduce

  1. Start the application
  2. Click "New"
  3. Select a location using the file dialog.

image

allemangD commented 4 years ago

This is likely related to https://github.com/BICCN/cell-locator/issues/134

jcfr commented 4 years ago

As of https://github.com/BICCN/cell-locator/commit/4104f2f58acf1ea2321ec747f360126faa325c77, clicking on New clear the scene put prevent the user from adding an other annotation.

After clicking New, let's make sure that at least one annotation is added.

The following is displayed:

Traceback (most recent call last):
  File "/home/jcfr/Projects/cell-locator-RelWithDebInfo-build/Slicer-build/lib/CellLocator-4.11/qt-scripted-modules/Home.py", line 565, in onNewAnnotationButtonClicked
    self.setAnnotations(annotations)
  File "/home/jcfr/Projects/cell-locator-RelWithDebInfo-build/Slicer-build/lib/CellLocator-4.11/qt-scripted-modules/Home.py", line 491, in setAnnotations
    self.setInteractionState('explore')
  File "/home/jcfr/Projects/cell-locator-RelWithDebInfo-build/Slicer-build/lib/CellLocator-4.11/qt-scripted-modules/Home.py", line 1323, in setInteractionState
    selectionNode.SetActivePlaceNodeID(self.Annotations.current.markup.GetID())
AttributeError: 'NoneType' object has no attribute 'markup'

@allemangD Could you have a look ?