mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
0021375: EDF 1671 SMESH: Dump study of current state
Do not erase commands of hyps not used to compute mesh
This commit is contained in:
parent
08a6d91f97
commit
7468bfdc0b
@ -2404,34 +2404,34 @@ bool _pyHypothesis::CanClear()
|
|||||||
|
|
||||||
void _pyHypothesis::ClearCommands()
|
void _pyHypothesis::ClearCommands()
|
||||||
{
|
{
|
||||||
if ( !theGen->IsToKeepAllCommands() )
|
// if ( !theGen->IsToKeepAllCommands() )
|
||||||
{
|
// {
|
||||||
bool isUsed = false;
|
// bool isUsed = false;
|
||||||
int lastComputeOrder = 0;
|
// int lastComputeOrder = 0;
|
||||||
list<Handle(_pyCommand) >::iterator cmd = myComputeCmds.begin();
|
// list<Handle(_pyCommand) >::iterator cmd = myComputeCmds.begin();
|
||||||
for ( ; cmd != myComputeCmds.end(); ++cmd )
|
// for ( ; cmd != myComputeCmds.end(); ++cmd )
|
||||||
if ( ! (*cmd)->IsEmpty() )
|
// if ( ! (*cmd)->IsEmpty() )
|
||||||
{
|
// {
|
||||||
isUsed = true;
|
// isUsed = true;
|
||||||
if ( (*cmd)->GetOrderNb() > lastComputeOrder )
|
// if ( (*cmd)->GetOrderNb() > lastComputeOrder )
|
||||||
lastComputeOrder = (*cmd)->GetOrderNb();
|
// lastComputeOrder = (*cmd)->GetOrderNb();
|
||||||
}
|
// }
|
||||||
if ( !isUsed )
|
// if ( !isUsed )
|
||||||
{
|
// {
|
||||||
SetRemovedFromStudy( true );
|
// SetRemovedFromStudy( true );
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
// clear my commands invoked after lastComputeOrder
|
// // clear my commands invoked after lastComputeOrder
|
||||||
// map<TCollection_AsciiString, list< Handle(_pyCommand) > >::iterator m2c;
|
// // map<TCollection_AsciiString, list< Handle(_pyCommand) > >::iterator m2c;
|
||||||
// for ( m2c = myMeth2Commands.begin(); m2c != myMeth2Commands.end(); ++m2c )
|
// // for ( m2c = myMeth2Commands.begin(); m2c != myMeth2Commands.end(); ++m2c )
|
||||||
// {
|
// // {
|
||||||
// list< Handle(_pyCommand)> & cmds = m2c->second;
|
// // list< Handle(_pyCommand)> & cmds = m2c->second;
|
||||||
// if ( !cmds.empty() && cmds.back()->GetOrderNb() > lastComputeOrder )
|
// // if ( !cmds.empty() && cmds.back()->GetOrderNb() > lastComputeOrder )
|
||||||
// cmds.back()->Clear();
|
// // cmds.back()->Clear();
|
||||||
// }
|
// // }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
_pyObject::ClearCommands();
|
_pyObject::ClearCommands();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user