mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 17:30:35 +05:00
SALOME Forum bug: sub-mesh removal leads to an Exception in a re-opened study.
1) call myFilterDlg->UnRegisterFilters(); 2) re-create an actor after converting a group to standalone as a CORBA object becomes different from that held by the actor
This commit is contained in:
parent
6a8e2f83ff
commit
997c16d89d
@ -38,7 +38,7 @@
|
||||
|
||||
#include <SMESH_TypeFilter.hxx>
|
||||
#include <SMESH_Actor.h>
|
||||
#include <SMESH_ActorUtils.h>
|
||||
//#include <SMESH_ActorUtils.h>
|
||||
#include <SMESH_LogicalFilter.hxx>
|
||||
|
||||
// SALOME GEOM includes
|
||||
@ -921,7 +921,7 @@ bool SMESHGUI_GroupDlg::onApply()
|
||||
QStringList anEntryList;
|
||||
|
||||
SMESH::SMESH_GroupBase_var resultGroup;
|
||||
bool isCreation;
|
||||
bool isCreation, isConversion = false;
|
||||
|
||||
if (myGrpTypeId == 0) // standalone
|
||||
{
|
||||
@ -942,6 +942,7 @@ bool SMESHGUI_GroupDlg::onApply()
|
||||
|
||||
myGroupOnGeom = SMESH::SMESH_GroupOnGeom::_nil();
|
||||
myGroupOnFilter = SMESH::SMESH_GroupOnFilter::_nil();
|
||||
isConversion = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1150,7 +1151,17 @@ bool SMESHGUI_GroupDlg::onApply()
|
||||
resultGroup->SetName(myName->text().toLatin1().data());
|
||||
|
||||
if ( aMeshGroupSO )
|
||||
{
|
||||
if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aMeshGroupSO->GetID().c_str())) {
|
||||
if ( isConversion ) { // need to reset TVisualObj and actor
|
||||
Handle(SALOME_InteractiveObject) anIO = anActor->getIO();
|
||||
SMESH::RemoveVisualObjectWithActors( anIO->getEntry(), true );
|
||||
SMESH::Update( anIO,true);
|
||||
myActorsList.clear();
|
||||
anActor = SMESH::FindActorByEntry( anIO->getEntry() );
|
||||
if ( !anActor ) return false;
|
||||
myActorsList.append( anActor );
|
||||
}
|
||||
anActor->setName(myName->text().toLatin1().data());
|
||||
QColor c;
|
||||
int delta;
|
||||
@ -1171,6 +1182,7 @@ bool SMESHGUI_GroupDlg::onApply()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
SMESHGUI::Modified();
|
||||
mySMESHGUI->updateObjBrowser(true);
|
||||
SMESH::UpdateView(); // asv: fix of BUG PAL5515
|
||||
@ -1193,6 +1205,8 @@ void SMESHGUI_GroupDlg::onOK()
|
||||
if ( onApply() )
|
||||
reject();
|
||||
setIsApplyAndClose( false );
|
||||
|
||||
if ( myFilterDlg ) myFilterDlg->UnRegisterFilters();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -2202,6 +2216,8 @@ void SMESHGUI_GroupDlg::reject()
|
||||
mySMESHGUI->ResetState();
|
||||
|
||||
QDialog::reject();
|
||||
|
||||
if ( myFilterDlg ) myFilterDlg->UnRegisterFilters();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
Loading…
Reference in New Issue
Block a user