View Issue Details

IDProjectCategoryView StatusLast Update
0004428Slicer4Module SubjectHierarchypublic2017-09-12 09:47
ReporterdzenanzAssigned Topinter 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0004428: qMRMLSubjectHierarchyComboBox is not populated if instantiated before the images are loaded
Description

I have a scripted widget which contains qMRMLSubjectHierarchyComboBox controls for selecting volumes. If this widget is accessed before before any data is loaded, the combo boxes are not populated, even when data is subsequently loaded.

Additional Information

Reproducible in this example (patient selection combo boxes):
https://github.com/dzenanz/Slicer/blob/22d9e7b49f2adb03cd0a7c6c8e610f43d48be5bd/Modules/Scripted/ProstateMRIUSContourPropagation/ProstateMRIUSContourPropagation.py

and this one:
https://github.com/dzenanz/Slicer/blob/fa805b464eef55b416e5c269c5dde14d2951e882/Modules/Scripted/ScriptedMWE/ScriptedMWEWidgets/ScriptedMWEWidget.py

TagsNo tags attached.

Activities

pinter

pinter

2017-09-07 10:43

developer   ~0015091

Thanks, I'll look into this. There are further issues with the combobox, it certainly needs attention.

pinter

pinter

2017-09-08 11:32

developer   ~0015092

I had to play around quite a while to find out when the problem you reported actually happens. It turns out that you need to have a filter in place to reproduce the issue.

Please in the future make sure you describe your problem in more detail, to avoid the developer having to spend extra time to find out what you already know, but chose not to share (the one about the filter), or not specifically enough (such as "access" and "data" in your description). Thanks!
https://www.slicer.org/wiki/Documentation/Nightly/Report_a_problem

dzenanz

dzenanz

2017-09-08 11:53

developer   ~0015093

Sorry about not being specific enough about accessing the widget. I didn't know I needed to be more specific than "before any data is loaded". In my testing, most qMRMLSubjectHierarchyComboBoxes had filters set, so I didn't notice it is a requirement for the bug to surface.

But you could have also asked for more information about reproducing, you didn't have to spend to much time re-creating it.

pinter

pinter

2017-09-08 15:52

developer   ~0015094

Hi Dzenan, I believe I fixed the issue. This was a tough one!
https://github.com/Slicer/Slicer/commit/cc182eae3c92230be87a27b43d98a4d3dfaffcf7

Please see if it works tomorrow. If so, please close the ticket.

dzenanz

dzenanz

2017-09-12 09:47

developer   ~0015096

That seems to have fixed it. Thanks Csaba!

Issue History

Date Modified Username Field Change
2017-09-07 10:14 dzenanz New Issue
2017-09-07 10:14 dzenanz Status new => assigned
2017-09-07 10:14 dzenanz Assigned To => pinter
2017-09-07 10:43 pinter Note Added: 0015091
2017-09-08 11:32 pinter Note Added: 0015092
2017-09-08 11:53 dzenanz Note Added: 0015093
2017-09-08 15:52 pinter Note Added: 0015094
2017-09-12 09:47 dzenanz Status assigned => closed
2017-09-12 09:47 dzenanz Resolution open => fixed
2017-09-12 09:47 dzenanz Note Added: 0015096