Import 2017-06-07 23:51:09: master 47845216

Author Committer Branch Timestamp Parent
jcfr jcfr master 2015-11-02 13:33:06 master 3337b416
Changeset

BUG: Editor: Gracefully handle "Create new LabelMap" without master volume

This commit avoids the following error when user attempts to create a
label map without any master volume:

Traceback (most recent call last):
File "/home/jcfr/Projects/Slicer-Debug/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/EditorLib/HelperBox.py", line 99, in newMerge
self.labelCreateDialog()
File "/home/jcfr/Projects/Slicer-Debug/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/EditorLib/HelperBox.py", line 317, in labelCreateDialog
dlg = LabelCreateDialog(slicer.util.mainWindow(), self.master, self.mergeVolumePostfix)
File "/home/jcfr/Projects/Slicer-Debug/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/EditorLib/LabelCreateDialog.py", line 78, in init
""" %(self._master.GetName(), self._master.GetName()+self._mergeVolumePostfix)
AttributeError: 'NoneType' object has no attribute 'GetName'

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24687 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Modules/Scripted/EditorLib/HelperBox.py Diff File
mod - Modules/Scripted/EditorLib/LabelCreateDialog.py Diff File