mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-14 02:30:33 +05:00
do not clear a command creating a removed group if the command does
other job like MakeBoundaryMesh() or DoubleNodeGroupNew()
This commit is contained in:
parent
65f809f886
commit
497561723e
@ -3700,6 +3700,8 @@ _pyGroup::_pyGroup(const Handle(_pyCommand)& theCreationCmd, const _pyID & id)
|
||||
if ( !id.IsEmpty() )
|
||||
setID( id );
|
||||
|
||||
myCanClearCreationCmd = true;
|
||||
|
||||
const _AString& method = theCreationCmd->GetMethod();
|
||||
if ( method == "CreateGroup" ) // CreateGroup() --> CreateEmptyGroup()
|
||||
{
|
||||
@ -3742,6 +3744,12 @@ _pyGroup::_pyGroup(const Handle(_pyCommand)& theCreationCmd, const _pyID & id)
|
||||
}
|
||||
myFilter = filter;
|
||||
}
|
||||
else
|
||||
{
|
||||
// theCreationCmd does something else apart from creation of this group
|
||||
// and thus it can't be cleared if this group is removed
|
||||
myCanClearCreationCmd = false;
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
@ -3829,9 +3837,9 @@ void _pyGroup::Process( const Handle(_pyCommand)& theCommand)
|
||||
void _pyGroup::Flush()
|
||||
{
|
||||
if ( !theGen->IsToKeepAllCommands() &&
|
||||
myCreationCmd && myCreationCmd->MethodStartsFrom("DoubleNode") )
|
||||
myCreationCmd && !myCanClearCreationCmd )
|
||||
{
|
||||
myCreationCmd.Nullify();
|
||||
myCreationCmd.Nullify(); // this way myCreationCmd won't be cleared
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -579,6 +579,7 @@ DEFINE_STANDARD_HANDLE (_pyFilter, _pyObject);
|
||||
class _pyGroup: public _pySubMesh
|
||||
{
|
||||
Handle(_pyFilter) myFilter;
|
||||
bool myCanClearCreationCmd;
|
||||
public:
|
||||
_pyGroup(const Handle(_pyCommand)& theCreationCmd, const _pyID & id=_pyID());
|
||||
virtual void Process( const Handle(_pyCommand)& theCommand);
|
||||
|
Loading…
Reference in New Issue
Block a user