]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Correction for reentrant tangent arc
authornds <nds@opencascade.com>
Tue, 6 Sep 2016 12:19:51 +0000 (15:19 +0300)
committernds <nds@opencascade.com>
Tue, 6 Sep 2016 12:19:51 +0000 (15:19 +0300)
src/PartSet/PartSet_SketcherReetntrantMgr.cpp

index 517e961c606e45118c444a44d6d45a145117d865..3f84648c87071f4ebbb409da957cb0232cc1fe6c 100755 (executable)
@@ -227,7 +227,7 @@ bool PartSet_SketcherReetntrantMgr::processMouseReleased(ModuleBase_IViewWindow*
       PartSet_WidgetPoint2D* aPoint2DWdg = dynamic_cast<PartSet_WidgetPoint2D*>(module()->activeWidget());
       ModuleBase_ModelWidget* aFirstWidget = aPanel->findFirstAcceptingValueWidget();
       if (aPoint2DWdg && aPoint2DWdg == aFirstWidget) {
-        if (!aPreSelected.empty() && myPreviousFeature->getKind() == SketchPlugin_Point::ID())
+        if (!aPreSelected.empty())
           aPoint2DWdg->setPreSelection(aPreSelected.front());
         aPoint2DWdg->mouseReleased(theWnd, theEvent);
         if (!aPreSelected.empty())
@@ -560,7 +560,8 @@ bool PartSet_SketcherReetntrantMgr::copyReetntrantAttributes(const FeaturePtr& t
                                                              const bool isTemporary)
 {
   bool aChanged = false;
-  if (!theSourceFeature.get())
+  if (!theSourceFeature.get() || !theSourceFeature->data().get() ||
+      !theSourceFeature->data()->isValid())
     return aChanged;
 
   std::string aFeatureKind = theSourceFeature->getKind();