mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
0023538: EDF 16777 - ASTERSTUDY: Suppression of meshes when AsterStudy is activated
This commit is contained in:
parent
976def5878
commit
f8f26cfa9b
@ -1830,20 +1830,24 @@ void SMESHGUI::OnEditDelete()
|
|||||||
int objectCount = 0;
|
int objectCount = 0;
|
||||||
QString aNameList;
|
QString aNameList;
|
||||||
QString aParentComponent = QString::null;
|
QString aParentComponent = QString::null;
|
||||||
Handle(SALOME_InteractiveObject) anIO;
|
|
||||||
for( SALOME_ListIteratorOfListIO anIt( selected ); anIt.More(); anIt.Next() )
|
for( SALOME_ListIteratorOfListIO anIt( selected ); anIt.More(); anIt.Next() )
|
||||||
{
|
{
|
||||||
anIO = anIt.Value();
|
Handle(SALOME_InteractiveObject) anIO = anIt.Value();
|
||||||
QString cur = anIO->getComponentDataType();
|
if ( anIO.IsNull() ) continue;
|
||||||
|
|
||||||
|
QString father = "unknown";
|
||||||
|
|
||||||
_PTR(SObject) aSO = aStudy->FindObjectID( anIO->getEntry() );
|
_PTR(SObject) aSO = aStudy->FindObjectID( anIO->getEntry() );
|
||||||
if (aSO) {
|
if (aSO) {
|
||||||
|
father = QString::fromStdString( aSO->GetFatherComponent()->ComponentDataType() );
|
||||||
// check if object is reference
|
// check if object is reference
|
||||||
_PTR(SObject) aRefSObj;
|
_PTR(SObject) aRefSObj;
|
||||||
aNameList.append("\n - ");
|
aNameList.append("\n - ");
|
||||||
if ( aSO->ReferencedObject( aRefSObj ) ) {
|
if ( aSO->ReferencedObject( aRefSObj ) ) {
|
||||||
QString aRefName = QString::fromStdString ( aRefSObj->GetName() );
|
QString aRefName = QString::fromStdString ( aRefSObj->GetName() );
|
||||||
aNameList.append( aRefName );
|
aNameList.append( aRefName );
|
||||||
cur = QString::fromStdString ( aRefSObj->GetFatherComponent()->ComponentDataType() );
|
father = QString::fromStdString ( aRefSObj->GetFatherComponent()->ComponentDataType() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
aNameList.append(anIO->getName());
|
aNameList.append(anIO->getName());
|
||||||
@ -1851,8 +1855,8 @@ void SMESHGUI::OnEditDelete()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( aParentComponent.isNull() )
|
if( aParentComponent.isNull() )
|
||||||
aParentComponent = cur;
|
aParentComponent = father;
|
||||||
else if( !aParentComponent.isEmpty() && aParentComponent!=cur )
|
else if( !aParentComponent.isEmpty() && aParentComponent!=father )
|
||||||
aParentComponent = "";
|
aParentComponent = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user