mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 17:00:34 +05:00
Fix for problem: empty root object in the Object Browser after trying to delete "Mesh" object.
This commit is contained in:
parent
61be698c0d
commit
ee2c380872
@ -655,7 +655,8 @@ namespace{
|
|||||||
return RefType;
|
return RefType;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnEditDelete()
|
|
||||||
|
void SMESHGUI::OnEditDelete()
|
||||||
{
|
{
|
||||||
// VSR 17/11/04: check if all objects selected belong to SMESH component --> start
|
// VSR 17/11/04: check if all objects selected belong to SMESH component --> start
|
||||||
SalomeApp_SelectionMgr* aSel = SMESHGUI::selectionMgr();
|
SalomeApp_SelectionMgr* aSel = SMESHGUI::selectionMgr();
|
||||||
@ -703,6 +704,13 @@ namespace{
|
|||||||
if(IObject->hasEntry()){
|
if(IObject->hasEntry()){
|
||||||
_PTR(SObject) SO = aStudy->FindObjectID(IObject->getEntry());
|
_PTR(SObject) SO = aStudy->FindObjectID(IObject->getEntry());
|
||||||
|
|
||||||
|
// disable removal of "SMESH" component object
|
||||||
|
if(SO->FindAttribute(anAttr, "AttributeIOR")){
|
||||||
|
anIOR = anAttr;
|
||||||
|
if ( !strcmp( (char*)anIOR->Value().c_str(), engineIOR().latin1() ) )
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* Erase child graphical objects */
|
/* Erase child graphical objects */
|
||||||
_PTR(ChildIterator) it = aStudy->NewChildIterator(SO);
|
_PTR(ChildIterator) it = aStudy->NewChildIterator(SO);
|
||||||
for(it->InitEx(true); it->More(); it->Next()){
|
for(it->InitEx(true); it->More(); it->Next()){
|
||||||
@ -1053,7 +1061,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
switch (theCommandID) {
|
switch (theCommandID) {
|
||||||
case 33: // DELETE
|
case 33: // DELETE
|
||||||
if(checkLock(aStudy)) break;
|
if(checkLock(aStudy)) break;
|
||||||
::OnEditDelete();
|
OnEditDelete();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 113: // IMPORT
|
case 113: // IMPORT
|
||||||
@ -2601,7 +2609,7 @@ void SMESHGUI::initialize( CAM_Application* app )
|
|||||||
anId = popupMgr()->insert( tr( "MEN_NUM" ), -1, -1 );
|
anId = popupMgr()->insert( tr( "MEN_NUM" ), -1, -1 );
|
||||||
|
|
||||||
popupMgr()->insert( action( 9010 ), anId, -1 );
|
popupMgr()->insert( action( 9010 ), anId, -1 );
|
||||||
popupMgr()->setRule( action( 9010 ), aMeshInVTK + "&& isVisible &&" + hasNodes, true );//@
|
popupMgr()->setRule( action( 9010 ), aMeshInVTK + "&& isVisible &&" + hasNodes, true );
|
||||||
popupMgr()->setRule( action( 9010 ), "{'Point'} in labeledTypes", false );
|
popupMgr()->setRule( action( 9010 ), "{'Point'} in labeledTypes", false );
|
||||||
|
|
||||||
popupMgr()->insert( action( 9011 ), anId, -1 );
|
popupMgr()->insert( action( 9011 ), anId, -1 );
|
||||||
|
@ -119,6 +119,9 @@ protected:
|
|||||||
void createPopupItem( const int, const QString&, const QString&,
|
void createPopupItem( const int, const QString&, const QString&,
|
||||||
const QString& = QString::null, const int = -1 );
|
const QString& = QString::null, const int = -1 );
|
||||||
|
|
||||||
|
private:
|
||||||
|
void OnEditDelete();
|
||||||
|
|
||||||
private :
|
private :
|
||||||
static SMESH::SMESH_Gen_var myComponentSMESH;
|
static SMESH::SMESH_Gen_var myComponentSMESH;
|
||||||
QDialog* myActiveDialogBox;
|
QDialog* myActiveDialogBox;
|
||||||
|
Loading…
Reference in New Issue
Block a user