mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-29 04:20:32 +05:00
22798: EDF 9100 SMESH: Dump python and "Compute()" position
Do not erase a previous Compute() if there were mesh edition commands after it
This commit is contained in:
parent
b905bf1432
commit
e9c9effdfa
@ -1793,11 +1793,30 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
|
|||||||
list< Handle(_pyHypothesis) >::iterator hyp;
|
list< Handle(_pyHypothesis) >::iterator hyp;
|
||||||
if ( !myLastComputeCmd.IsNull() )
|
if ( !myLastComputeCmd.IsNull() )
|
||||||
{
|
{
|
||||||
|
// check if the previously computed mesh has been edited,
|
||||||
|
// if so then we do not clear the previous Compute()
|
||||||
|
bool toClear = true;
|
||||||
|
if ( myLastComputeCmd->GetMethod() == "Compute" )
|
||||||
|
{
|
||||||
|
list< Handle(_pyMeshEditor)>::iterator e = myEditors.begin();
|
||||||
|
for ( ; e != myEditors.end() && toClear; ++e )
|
||||||
|
{
|
||||||
|
list< Handle(_pyCommand)>& cmds = (*e)->GetProcessedCmds();
|
||||||
|
list< Handle(_pyCommand) >::reverse_iterator cmd = cmds.rbegin();
|
||||||
|
if ( cmd != cmds.rend() &&
|
||||||
|
(*cmd)->GetOrderNb() > myLastComputeCmd->GetOrderNb() )
|
||||||
|
toClear = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( toClear )
|
||||||
|
{
|
||||||
|
// clear hyp commands called before myLastComputeCmd
|
||||||
for ( hyp = myHypos.begin(); hyp != myHypos.end(); ++hyp )
|
for ( hyp = myHypos.begin(); hyp != myHypos.end(); ++hyp )
|
||||||
(*hyp)->ComputeDiscarded( myLastComputeCmd );
|
(*hyp)->ComputeDiscarded( myLastComputeCmd );
|
||||||
|
|
||||||
myLastComputeCmd->Clear();
|
myLastComputeCmd->Clear();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
myLastComputeCmd = theCommand;
|
myLastComputeCmd = theCommand;
|
||||||
|
|
||||||
for ( hyp = myHypos.begin(); hyp != myHypos.end(); ++hyp )
|
for ( hyp = myHypos.begin(); hyp != myHypos.end(); ++hyp )
|
||||||
@ -1961,7 +1980,7 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
|
|||||||
//
|
//
|
||||||
// remove "PartTo" from the method
|
// remove "PartTo" from the method
|
||||||
TCollection_AsciiString newMethod = method;
|
TCollection_AsciiString newMethod = method;
|
||||||
newMethod.Remove( 7, 6 );
|
newMethod.Remove( /*where=*/7, /*howmany=*/6 );
|
||||||
theCommand->SetMethod( newMethod );
|
theCommand->SetMethod( newMethod );
|
||||||
// make the 1st arg be the last one (or last but three for ExportMED())
|
// make the 1st arg be the last one (or last but three for ExportMED())
|
||||||
_pyID partID = theCommand->GetArg( 1 );
|
_pyID partID = theCommand->GetArg( 1 );
|
||||||
|
@ -127,7 +127,7 @@ public:
|
|||||||
_AString GetIndentation();
|
_AString GetIndentation();
|
||||||
const _AString & GetResultValue();
|
const _AString & GetResultValue();
|
||||||
int GetNbResultValues();
|
int GetNbResultValues();
|
||||||
const _AString& GetResultValue(int res);
|
const _AString & GetResultValue(int res);
|
||||||
const _AString & GetObject();
|
const _AString & GetObject();
|
||||||
const _AString & GetMethod();
|
const _AString & GetMethod();
|
||||||
const _AString & GetArg( int index );
|
const _AString & GetArg( int index );
|
||||||
|
Loading…
Reference in New Issue
Block a user