From: nds Date: Wed, 5 Apr 2017 12:55:20 +0000 (+0300) Subject: Issue #1948 multiply selection with Shift button pressed does not work X-Git-Tag: V_2.7.0~62 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b98a27bcc6f10bf181ecc0ce98b10a3f794f726c;p=modules%2Fshaper.git Issue #1948 multiply selection with Shift button pressed does not work Regression correction, selection of dimensions leads to crash. --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 87cbaac30..7a9c2c788 100755 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -1518,8 +1518,14 @@ void PartSet_SketcherMgr::getSelectionOwners(const FeaturePtr& theFeature, std::list aResults = theFeature->results(); std::list::const_iterator aIt; - const TopoDS_Shape aFirstShape = theFeature->firstResult()->shape()->impl(); - bool isSameShape = aFirstShape.IsEqual(anInfo.myFirstResultShape); + bool isSameShape = false; + if (aResults.size() > 0) { + ResultPtr aFirstResult = theFeature->firstResult(); + if (aFirstResult.get() && aFirstResult->shape().get()) { + const TopoDS_Shape& aFirstShape = aFirstResult->shape()->impl(); + isSameShape = aFirstShape.IsEqual(anInfo.myFirstResultShape); + } + } for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt) { ResultPtr aResult = *aIt; AISObjectPtr aAISObj = aDisplayer->getAISObject(aResult); @@ -1730,7 +1736,10 @@ void PartSet_SketcherMgr::storeSelection(const bool theHighlightedOnly) if (myCurrentSelection.find(aFeature) != myCurrentSelection.end()) anInfo = myCurrentSelection.find(aFeature).value(); - const TopoDS_Shape aFirstShape = aFeature->firstResult()->shape()->impl(); + TopoDS_Shape aFirstShape; + ResultPtr aFirstResult = aFeature->firstResult(); + if (aFirstResult.get() && aFirstResult->shape().get()) + aFirstShape = aFirstResult->shape()->impl(); anInfo.myFirstResultShape = aFirstShape; Handle(SelectMgr_EntityOwner) anOwner = aPrs->owner(); if (aResult.get()) {