From: mpv Date: Tue, 27 Feb 2018 12:41:02 +0000 (+0300) Subject: Fix for the issue #2451 : shaper shuts down by itself X-Git-Tag: V_3.0.0~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=47b847879ff823e08eb9e0d8b059cf1da6e740ec;p=modules%2Fshaper.git Fix for the issue #2451 : shaper shuts down by itself --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 4ff214d08..fbca21045 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -2026,6 +2026,16 @@ bool XGUI_Workshop::canMoveFeature() QObjectPtrList::const_iterator anIt = aObjects.begin(), aLast = aObjects.end(); for (; anIt != aLast && aCanMove; anIt++) { ObjectPtr aObject = *anIt; + if (!aObject.get() || !aObject->data().get() || !aObject->data()->isValid()) { + aCanMove = false; + break; + } + FeaturePtr aFeat = std::dynamic_pointer_cast(aObject); + if (aFeat.get() && aFeat->getKind() != "Group") { // only groups can be moved to the end for now (#2451) + aCanMove = false; + break; + } + // 1. Get features placed between selected and current in the document std::list aFeaturesBetween = toCurrentFeatures(aObject); // if aFeaturesBetween is empty it means wrong order or aObject is the current feature