From: vsv Date: Wed, 26 Feb 2020 09:19:21 +0000 (+0300) Subject: Issue #3152: Consider only results in selection for modification of Isos X-Git-Tag: V9_5_0a1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=51c160f44d10c273162641bed4c426a8f09867df;p=modules%2Fshaper.git Issue #3152: Consider only results in selection for modification of Isos --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index c2d44a802..63a1c2327 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -3194,10 +3194,18 @@ void XGUI_Workshop::changeIsoLines(const QObjectPtrList& theObjects) if (theObjects.isEmpty()) return; + QList aResultList; + ResultPtr aRes; + foreach(ObjectPtr aObj, theObjects) { + aRes = std::dynamic_pointer_cast(aObj); + if (aRes.get()) + aResultList.append(aRes); + } + std::vector aValues; bool isVisible; - if (theObjects.size() == 1) { - ResultPtr aRes = std::dynamic_pointer_cast(theObjects.first()); + if (aResultList.size() == 1) { + ResultPtr aRes = aResultList.first(); if (aRes.get()) ModelAPI_Tools::getIsoLines(aRes, isVisible, aValues); else @@ -3236,12 +3244,8 @@ void XGUI_Workshop::changeIsoLines(const QObjectPtrList& theObjects) aValues[0] = aUNb->value(); aValues[1] = aVNb->value(); - ResultPtr aRes; - foreach(ObjectPtr aObj, theObjects) { - aRes = std::dynamic_pointer_cast(aObj); - if (aRes.get()) { - ModelAPI_Tools::setIsoLines(aRes, aValues); - } + foreach(ResultPtr aRes, aResultList) { + ModelAPI_Tools::setIsoLines(aRes, aValues); } mySelector->clearSelection(); Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));