mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
Fix for the bug IPAL22091: Crash by calling context menu on the SMESH presentation
This commit is contained in:
parent
36ec1b3d2f
commit
95fb8be9ca
@ -1421,13 +1421,6 @@
|
|||||||
|
|
||||||
SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
|
SalomeApp_Application* anApp = dynamic_cast<SalomeApp_Application*>( SUIT_Session::session()->activeApplication() );
|
||||||
|
|
||||||
ViewManagerList aViewMenegers = anApp->viewManagers();
|
|
||||||
ViewManagerList::const_iterator it = aViewMenegers.begin();
|
|
||||||
for( ; it != aViewMenegers.end(); it++) {
|
|
||||||
|
|
||||||
SUIT_ViewManager* vm = *it;
|
|
||||||
int nbSf = vm ? vm->getViewsCount() : 0;
|
|
||||||
|
|
||||||
SALOME_ListIteratorOfListIO It(selected);
|
SALOME_ListIteratorOfListIO It(selected);
|
||||||
|
|
||||||
aStudyBuilder->NewCommand(); // There is a transaction
|
aStudyBuilder->NewCommand(); // There is a transaction
|
||||||
@ -1468,7 +1461,13 @@
|
|||||||
std::string anEntry = SO->GetID();
|
std::string anEntry = SO->GetID();
|
||||||
|
|
||||||
/** Erase graphical object **/
|
/** Erase graphical object **/
|
||||||
if(SO->FindAttribute(anAttr, "AttributeIOR") && vm ){
|
if(SO->FindAttribute(anAttr, "AttributeIOR")){
|
||||||
|
ViewManagerList aViewMenegers = anApp->viewManagers();
|
||||||
|
ViewManagerList::const_iterator it = aViewMenegers.begin();
|
||||||
|
for( ; it != aViewMenegers.end(); it++) {
|
||||||
|
SUIT_ViewManager* vm = *it;
|
||||||
|
int nbSf = vm ? vm->getViewsCount() : 0;
|
||||||
|
if(vm) {
|
||||||
QVector<SUIT_ViewWindow*> aViews = vm->getViews();
|
QVector<SUIT_ViewWindow*> aViews = vm->getViews();
|
||||||
for(int i = 0; i < nbSf; i++){
|
for(int i = 0; i < nbSf; i++){
|
||||||
SUIT_ViewWindow *sf = aViews[i];
|
SUIT_ViewWindow *sf = aViews[i];
|
||||||
@ -1477,7 +1476,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/** Remove an object from data structures **/
|
/** Remove an object from data structures **/
|
||||||
SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( SMESH::SObjectToObject( SO ));
|
SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( SMESH::SObjectToObject( SO ));
|
||||||
SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( SMESH::SObjectToObject( SO ));
|
SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( SMESH::SObjectToObject( SO ));
|
||||||
@ -1512,7 +1512,6 @@
|
|||||||
} /* listSO back loop */
|
} /* listSO back loop */
|
||||||
} /* IObject->hasEntry() */
|
} /* IObject->hasEntry() */
|
||||||
} /* more/next */
|
} /* more/next */
|
||||||
} /* aViewMenegers list loop */
|
|
||||||
|
|
||||||
aStudyBuilder->CommitCommand();
|
aStudyBuilder->CommitCommand();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user