From e1a4accc777cbf511aab78cc86412bff1a718792 Mon Sep 17 00:00:00 2001 From: sbh Date: Thu, 29 Jan 2015 18:23:06 +0300 Subject: [PATCH] Issue #387 #388 Fix for the crash in the swig generated code on export --- src/ModuleBase/ModuleBase_Operation.cpp | 2 ++ src/XGUI/XGUI_PropertyPanel.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ModuleBase/ModuleBase_Operation.cpp b/src/ModuleBase/ModuleBase_Operation.cpp index 96060b463..de9a9e857 100644 --- a/src/ModuleBase/ModuleBase_Operation.cpp +++ b/src/ModuleBase/ModuleBase_Operation.cpp @@ -66,6 +66,8 @@ bool ModuleBase_Operation::isValid() const { if (!myFeature) return true; // rename operation + if (myFeature->isAction()) + return true; //Get validators for the Id SessionPtr aMgr = ModelAPI_Session::get(); ModelAPI_ValidatorsFactory* aFactory = aMgr->validators(); diff --git a/src/XGUI/XGUI_PropertyPanel.cpp b/src/XGUI/XGUI_PropertyPanel.cpp index d5d213691..22c56c2a3 100644 --- a/src/XGUI/XGUI_PropertyPanel.cpp +++ b/src/XGUI/XGUI_PropertyPanel.cpp @@ -142,7 +142,7 @@ void XGUI_PropertyPanel::updateContentWidget(FeaturePtr theFeature) // Invalid feature case on abort of the operation if (theFeature.get() == NULL) return; - if(!theFeature->data()) + if (theFeature->isAction() || !theFeature->data()) return; foreach(ModuleBase_ModelWidget* eachWidget, myWidgets) { -- 2.39.2