From 5eb938b7e88d66a865cb311e7dde0cbe0160dfc3 Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 10 Sep 2015 15:09:16 +0300 Subject: [PATCH] Fix for the issue #905 --- src/ModuleBase/ModuleBase_OperationFeature.cpp | 4 +++- src/PythonAPI/geom/__init__.py | 1 - src/XGUI/XGUI_Workshop.cpp | 18 ++++++++++-------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/ModuleBase/ModuleBase_OperationFeature.cpp b/src/ModuleBase/ModuleBase_OperationFeature.cpp index 18eba405d..797f9e2ab 100755 --- a/src/ModuleBase/ModuleBase_OperationFeature.cpp +++ b/src/ModuleBase/ModuleBase_OperationFeature.cpp @@ -195,7 +195,9 @@ void ModuleBase_OperationFeature::abort() stopOperation(); // is is necessary to deactivate current widgets before the model operation is aborted // because abort removes the feature and activated filters should not check it - propertyPanel()->cleanContent(); + if (aPropertyPanel) { // feature may be not created (plugin load fail) + aPropertyPanel->cleanContent(); + } aMgr->abortOperation(); emit stopped(); diff --git a/src/PythonAPI/geom/__init__.py b/src/PythonAPI/geom/__init__.py index 1ba89b9d9..c6faa27e3 100644 --- a/src/PythonAPI/geom/__init__.py +++ b/src/PythonAPI/geom/__init__.py @@ -19,7 +19,6 @@ from GeomAPI import GeomAPI_Shape as Shape # Swigged interfaces to Modeling Algorithms from GeomAlgoAPI import GeomAlgoAPI_Boolean as Boolean -from GeomAlgoAPI import GeomAlgoAPI_Extrusion as Extrusion # Emulation of interfaces not yet swigged diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 6dfaa1765..38ca4d934 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -495,14 +495,16 @@ void XGUI_Workshop::onOperationStopped(ModuleBase_Operation* theOperation) // They were deactivated on operation start or an object redisplay QObjectPtrList anObjects; FeaturePtr aFeature = aFOperation->feature(); - if (myDisplayer->isVisible(aFeature) && !myDisplayer->isActive(aFeature)) - anObjects.append(aFeature); - std::list aResults = aFeature->results(); - std::list::const_iterator aIt; - for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt) { - ResultPtr anObject = *aIt; - if (myDisplayer->isVisible(anObject) && !myDisplayer->isActive(anObject)) { - anObjects.append(anObject); + if (aFeature.get()) { // feature may be not created (plugin load fail) + if (myDisplayer->isVisible(aFeature) && !myDisplayer->isActive(aFeature)) + anObjects.append(aFeature); + std::list aResults = aFeature->results(); + std::list::const_iterator aIt; + for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt) { + ResultPtr anObject = *aIt; + if (myDisplayer->isVisible(anObject) && !myDisplayer->isActive(anObject)) { + anObjects.append(anObject); + } } } QIntList aModes; -- 2.39.2