mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-24 16:30:34 +05:00
Call BreakLinks method
This commit is contained in:
parent
b8ddb1330c
commit
c47c00f480
@ -1400,7 +1400,9 @@ namespace
|
|||||||
QObject::tr("MSG_BREAK_SHAPER_LINK").arg(aName.c_str()),
|
QObject::tr("MSG_BREAK_SHAPER_LINK").arg(aName.c_str()),
|
||||||
SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::No);
|
SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::No);
|
||||||
if (aRes == SUIT_MessageBox::Yes) {
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -614,8 +614,10 @@ bool SMESHGUI_Selection::hasGeomReference( int ind ) const
|
|||||||
bool SMESHGUI_Selection::canBreakLink( int ind ) const
|
bool SMESHGUI_Selection::canBreakLink( int ind ) const
|
||||||
{
|
{
|
||||||
if ( ind >= 0 && ind < myTypes.count()) {
|
if ( ind >= 0 && ind < myTypes.count()) {
|
||||||
_PTR(SObject) so = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() );
|
_PTR(SObject) aSObject = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() );
|
||||||
return true;
|
GEOM::GEOM_Object_var aObject = SMESH::SObjectToInterface<GEOM::GEOM_Object>(aSObject);
|
||||||
|
if (!aObject->_is_nil())
|
||||||
|
return aObject->IsParametrical();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user