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<GEOM::GEOM_Object>(aSObj);
+ if (!aObject->_is_nil())
+ aObject->BreakLinks();
}
}
}
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<GEOM::GEOM_Object>(aSObject);
+ if (!aObject->_is_nil())
+ return aObject->IsParametrical();
}
return false;
}