From: nds Date: Thu, 17 Dec 2015 14:47:42 +0000 (+0300) Subject: Correction for: 1. crash by popup menu call on origin, 2. reentered presentation... X-Git-Tag: V_2.1.0~151 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d9c23ebd5ca6eb6790c8351104f712e6646cfec7;p=modules%2Fshaper.git Correction for: 1. crash by popup menu call on origin, 2. reentered presentation(point) is visualized. --- diff --git a/src/PartSet/PartSet_SketcherReetntrantMgr.cpp b/src/PartSet/PartSet_SketcherReetntrantMgr.cpp index c749c930d..e2e5442d9 100755 --- a/src/PartSet/PartSet_SketcherReetntrantMgr.cpp +++ b/src/PartSet/PartSet_SketcherReetntrantMgr.cpp @@ -392,7 +392,10 @@ void PartSet_SketcherReetntrantMgr::createInternalFeature() QList aWidgets = aFactory.getModelWidgets(); foreach (ModuleBase_ModelWidget* aWidget, aWidgets) { - aWidget->setFeature(myInternalFeature, true); + bool isStoreValue = !aFOperation->isEditOperation() && + !aWidget->getDefaultValue().empty() && + !aWidget->isComputedDefault(); + aWidget->setFeature(myInternalFeature, isStoreValue); } ModuleBase_ModelWidget* aFirstWidget = ModuleBase_IPropertyPanel::findFirstAcceptingValueWidget (aWidgets); diff --git a/src/PartSet/PartSet_Tools.cpp b/src/PartSet/PartSet_Tools.cpp index f9dfb6c0b..893e692c7 100755 --- a/src/PartSet/PartSet_Tools.cpp +++ b/src/PartSet/PartSet_Tools.cpp @@ -732,6 +732,8 @@ FeaturePtr PartSet_Tools::findFirstCoincidence(const FeaturePtr& theFeature, std::shared_ptr thePoint) { FeaturePtr aCoincident; + if (theFeature.get() == NULL) + return aCoincident; const std::set& aRefsList = theFeature->data()->refsToMe(); std::set::const_iterator aIt; diff --git a/src/XGUI/XGUI_ContextMenuMgr.cpp b/src/XGUI/XGUI_ContextMenuMgr.cpp index 57c622ac3..940901ce4 100644 --- a/src/XGUI/XGUI_ContextMenuMgr.cpp +++ b/src/XGUI/XGUI_ContextMenuMgr.cpp @@ -456,9 +456,11 @@ void XGUI_ContextMenuMgr::addViewerMenu(QMenu* theMenu) const QActionsList aActions; if (aSelected == 1) { ObjectPtr aObject = aPrsList.first().object(); - std::string aName = aObject->groupName(); - if (myViewerMenu.contains(aName)) - aActions = myViewerMenu[aName]; + if (aObject.get() != NULL) { + std::string aName = aObject->groupName(); + if (myViewerMenu.contains(aName)) + aActions = myViewerMenu[aName]; + } aActions.append(action("COLOR_CMD")); } else if (aSelected > 1) { aActions.append(action("HIDE_CMD"));