diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 5a3747d0c..776e7653c 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -1400,7 +1400,9 @@ namespace QObject::tr("MSG_BREAK_SHAPER_LINK").arg(aName.c_str()), SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::No); if (aRes == SUIT_MessageBox::Yes) { - // Remove link here + GEOM::GEOM_Object_var aObject = SMESH::SObjectToInterface(aSObj); + if (!aObject->_is_nil()) + aObject->BreakLinks(); } } } diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index d4b79054e..c79334554 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -614,8 +614,10 @@ bool SMESHGUI_Selection::hasGeomReference( int ind ) const bool SMESHGUI_Selection::canBreakLink( int ind ) const { if ( ind >= 0 && ind < myTypes.count()) { - _PTR(SObject) so = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() ); - return true; + _PTR(SObject) aSObject = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() ); + GEOM::GEOM_Object_var aObject = SMESH::SObjectToInterface(aSObject); + if (!aObject->_is_nil()) + return aObject->IsParametrical(); } return false; }