BUG: EditBox: Ensure state variable are initialized before calling "create()"
This commit fixes regression introduced by r23636.
The following tests are now passing:
- py_StandaloneEditorWidgetTest
- py_ThresholdThreadingTest
- py_NeurosurgicalPlanningTutorialMarkupsSelfTest
The associated error was:
Traceback (most recent call last):
File "/path/to/Slicer-build/lib/Slicer-4.3/qt-scripted-modules/Editor.py", line 244, in setup
self.createEditBox()
File "/path/to/Slicer-build/lib/Slicer-4.3/qt-scripted-modules/Editor.py", line 280, in createEditBox
self.toolsBox = EditorLib.EditBox(self.editBoxFrame, optionsFrame=self.effectOptionsFrame)
File "/path/to/Slicer-build/lib/Slicer-4.3/qt-scripted-modules/EditorLib/EditBox.py", line 74, in init
self.create()
File "/path/to/Slicer-build/lib/Slicer-4.3/qt-scripted-modules/EditorLib/EditBox.py", line 289, in create
self._onParameterNodeModified(self.editUtil.getParameterNode())
File "/path/to/Slicer-build/lib/Slicer-4.3/qt-scripted-modules/EditorLib/EditBox.py", line 105, in _onParameterNodeModified
self._onEffectChanged(caller.GetParameter("effect"))
File "/path/to/Slicer-build/lib/Slicer-4.3/qt-scripted-modules/EditorLib/EditBox.py", line 336, in _onEffectChanged
if self.currentOption:
AttributeError: 'EditBox' object has no attribute 'currentOption'
git-svn-id: http://svn.slicer.org/Slicer4/trunk@23639 3bd1e089-480b-0410-8dfb-8563597acbee |