Skip to content

Commit

Permalink
BUG: DICOMWidgets: Skip promptForExtension dialog if extension suppor…
Browse files Browse the repository at this point in the history
…t disabled

This commit fixes a runtime error about missing 'extensionsManagerModel'
attribute reported when Slicer is built without extension support.

Indeed, qSlicerCoreApplication::extentionsManagerModel does not exist
because it's surrounded by #ifdef Slicer_BUILD_EXTENSIONMANAGER_SUPPORT.

svn-url: http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=28033
git-svn-id: http://svn.slicer.org/Slicer4/trunk@28033 3bd1e089-480b-0410-8dfb-8563597acbee
  • Loading branch information
vovythevov authored and jcfr committed Mar 16, 2019
1 parent b8a9180 commit 1f1fe12
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Modules/Scripted/DICOMLib/DICOMWidgets.py
Expand Up @@ -412,6 +412,9 @@ def onDirectoryImported(self):
"""The dicom browser will emit multiple directoryImported
signals during the same operation, so we collapse them
into a single check for compatible extensions."""
if not hasattr(slicer.app, 'extensionsManagerModel'):
# Slicer may not be built with extension manager support
return
if not self.extensionCheckPending:
self.extensionCheckPending = True
def timerCallback():
Expand Down

0 comments on commit 1f1fe12

Please sign in to comment.