View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004006 | Slicer4 | Module SceneViews | public | 2015-06-17 11:58 | 2018-03-02 11:06 |
Reporter | nicole | Assigned To | nicole | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | |||||
Target Version | Slicer 4.5.0-1 | Fixed in Version | Slicer 4.5.0-1 | ||
Summary | 0004006: Loading an MRB with a manual scene view disables Editor effects | ||||
Description | From Steve: | ||||
Steps To Reproduce | It's easiest to trigger when reloading an MRB while having the Editor module open: Sample data, load MRHead | ||||
Tags | No tags attached. | ||||
If I skip the "make a scene view" step, still get the effects not changing (though it seems like in this case get button press feedback but not GUI swap out). I also have to set the master volume after loading the MRB. |
|
Some more testing: if I save just as a MRML file, close the scene and reload it: same issue in the Editor. Suspect that it's sometjing about making the default master scene view on save of mrml or mrb. |
|
A few things are contributing to this bug: Singleton tags are not written to XML. When a scene is read in with a scripted module node for the editor, it only has ModuleName set (Editor), the singleton tag (Editor) wasn't saved. So on importing from the MRML file on disk, if you're in the Editor module, there is a singleton editor parameter node in the scene, but the incoming scripted module node isn't detected as a singleton so both are present in the scene. In EditUtil.py _findParameterNodeInScene, it looks through the scene only checking for scripted module nodes that have the ModuleName set to Editor, and after loading a new scene, the new one is found first and used, even though it's not tagged as a singleton. I did quick test to see if I could fix it inside the Editor rather than having to change the vtkMRMLNode Read/Write XML to read and print out the singleton tags, and expanding the test in _findParameterNodeInScene seems to have fixed the "not able to switch tools" problem by making sure it uses the original singleton editor parameter node rather than the one that was in the scene on disk: But in a larger sense, not having the singleton tags in the XML file means that any (most?) singleton nodes aren't going to get updated properly on loading in a new MRML scene. |
|
I did some quick testing and I agree with your assessment. It seems we can fix the Editor now by adding the check for the SingletonTag as you suggest. Longer term I don't see any problems (only benefits) from including the SingletonTag in the XML. Not sure why it wasn't included in the first case. |
|
Okay, will make that quick fix. |
|
Editor effects work on scene load in svn 24528: |
|
Confirmed - nice! |
|
Pull request for serialising the singleton tags: |
|
Serialising singleton nodes integrated in: |
|
Updated two tests with new baseline mrml files: |
|
Import 2017-06-07 23:51:09: master b1bb1b7c 2015-09-09 15:41:11 naucoin Details Diff |
BUG: expand the Editor parameter node checking When an Editor parameter node is present in the current scene as well as in a MRML file about to be loaded, the check for the singleton node was failing (the singleton tag is not serialised to XML), this change expands the check so that the original singleton parameter node is found (the loaded one is not a singleton). Issue 0004006 git-svn-id: http://svn.slicer.org/Slicer4/trunk@24528 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Modules/Scripted/EditorLib/EditUtil.py | Diff File | ||
Import 2017-06-07 23:51:09: master 808c8e68 2015-09-29 16:55:06 naucoin Details Diff |
ENH: serialise singleton tags Singleton nodes were not having their singleton tag serialised to MRML, so on loading a scene back in, two nodes would be present in the scene if the node logic is relying on the tag to update the originally in the scene node. This fix serialised the singleton tag to MRML, adds a utility method to uniformly turn the property on or off, adds a test, and expands the node documentation to note that the hack in the scene to get untagged singleton nodes is needed for legacy scene files. Also gave examples for the conventions for singleton tag strings in the mrml node header file. Issue 0004006 git-svn-id: http://svn.slicer.org/Slicer4/trunk@24582 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Libs/MRML/Core/vtkMRMLCoreTestingMacros.h | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLNode.cxx | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLNode.h | Diff File | ||
mod - Libs/MRML/Core/vtkMRMLScene.cxx | Diff File | ||
Import 2017-06-07 23:51:09: master 59b0f874 2015-09-29 18:33:16 naucoin Details Diff |
BUG: update the baseline mrml file for singleton changes Add the singleton tag to the baseline mrml file for the camera displayable manager test. Issue 0004006 git-svn-id: http://svn.slicer.org/Slicer4/trunk@24585 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - Libs/MRML/DisplayableManager/Testing/Data/vtkMRMLCameraDisplayableManagerTest1.mrml | Diff File | ||
Import 2017-06-07 23:51:09: master 30a89fef 2015-10-06 16:49:04 naucoin Details Diff |
BUG: update EMSegment to fix failing test Updated the EMSegment testing MRML file to include the singletonTag so that the comparison between the baseline mrml file and the written one will succeed. Fixes test EMSeg_MRML_DiffReadWriteNodes Issue 0004006 git-svn-id: http://svn.slicer.org/Slicer4/trunk@24607 3bd1e089-480b-0410-8dfb-8563597acbee |
||
mod - SuperBuild.cmake | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-06-17 11:58 | nicole | New Issue | |
2015-06-17 11:58 | nicole | Status | new => assigned |
2015-06-17 11:58 | nicole | Assigned To | => nicole |
2015-06-17 13:53 | nicole | Note Added: 0013133 | |
2015-09-04 08:06 | nicole | Note Added: 0013253 | |
2015-09-04 11:11 | nicole | Note Added: 0013257 | |
2015-09-09 12:07 | pieper | Note Added: 0013264 | |
2015-09-09 12:12 | nicole | Note Added: 0013265 | |
2015-09-09 12:16 | nicole | Note Added: 0013266 | |
2015-09-09 12:16 | nicole | Status | assigned => resolved |
2015-09-09 12:16 | nicole | Fixed in Version | => Slicer 4.5.0-1 |
2015-09-09 12:16 | nicole | Resolution | open => fixed |
2015-09-09 12:54 | nicole | Note Edited: 0013266 | |
2015-09-09 16:00 | pieper | Note Added: 0013267 | |
2015-09-09 16:00 | pieper | Status | resolved => closed |
2015-09-28 10:04 | nicole | Note Added: 0013321 | |
2015-09-29 13:32 | nicole | Note Added: 0013323 | |
2015-09-29 13:32 | nicole | Status | closed => resolved |
2015-10-06 13:42 | nicole | Note Added: 0013347 | |
2016-01-22 12:43 | pieper | Relationship added | related to 0004128 |
2017-06-10 08:51 | Changeset attached | => Slicer master 30a89fef | |
2017-06-10 08:51 | Changeset attached | => Slicer master 59b0f874 | |
2017-06-10 08:51 | Changeset attached | => Slicer master 808c8e68 | |
2017-06-10 08:51 | Changeset attached | => Slicer master b1bb1b7c | |
2018-03-02 11:06 | jcfr | Status | resolved => closed |