]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Correction for: 1. crash by popup menu call on origin, 2. reentered presentation...
authornds <nds@opencascade.com>
Thu, 17 Dec 2015 14:47:42 +0000 (17:47 +0300)
committernds <nds@opencascade.com>
Thu, 17 Dec 2015 14:48:13 +0000 (17:48 +0300)
src/PartSet/PartSet_SketcherReetntrantMgr.cpp
src/PartSet/PartSet_Tools.cpp
src/XGUI/XGUI_ContextMenuMgr.cpp

index c749c930df6f3b9a78e742e381c14dfea350c063..e2e5442d9a09d93ae48975b8eef1d4422a840631 100755 (executable)
@@ -392,7 +392,10 @@ void PartSet_SketcherReetntrantMgr::createInternalFeature()
     QList<ModuleBase_ModelWidget*> 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);
index f9dfb6c0b4bb4b847906bd3207bafa9586045eb6..893e692c7b4a122471643bb95ed0482182d36219 100755 (executable)
@@ -732,6 +732,8 @@ FeaturePtr PartSet_Tools::findFirstCoincidence(const FeaturePtr& theFeature,
                                                std::shared_ptr<GeomAPI_Pnt2d> thePoint)
 {
   FeaturePtr aCoincident;
+  if (theFeature.get() == NULL)
+    return aCoincident;
 
   const std::set<AttributePtr>& aRefsList = theFeature->data()->refsToMe();
   std::set<AttributePtr>::const_iterator aIt;
index 57c622ac3ad66bfe5408be5e957258228c4cd44f..940901ce4be41b00ec8d30af48f49f3dcf884e64 100644 (file)
@@ -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"));