mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-27 18:50:33 +05:00
Merge branch 'master' into V7_5_BR
This commit is contained in:
commit
89858d7e4c
@ -1793,10 +1793,29 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand )
|
|||||||
list< Handle(_pyHypothesis) >::iterator hyp;
|
list< Handle(_pyHypothesis) >::iterator hyp;
|
||||||
if ( !myLastComputeCmd.IsNull() )
|
if ( !myLastComputeCmd.IsNull() )
|
||||||
{
|
{
|
||||||
for ( hyp = myHypos.begin(); hyp != myHypos.end(); ++hyp )
|
// check if the previously computed mesh has been edited,
|
||||||
(*hyp)->ComputeDiscarded( myLastComputeCmd );
|
// 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 )
|
||||||
|
(*hyp)->ComputeDiscarded( myLastComputeCmd );
|
||||||
|
|
||||||
myLastComputeCmd->Clear();
|
myLastComputeCmd->Clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
myLastComputeCmd = theCommand;
|
myLastComputeCmd = theCommand;
|
||||||
|
|
||||||
@ -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 );
|
||||||
|
@ -117,17 +117,17 @@ public:
|
|||||||
_pyCommand( const _AString& theString, int theNb=-1 )
|
_pyCommand( const _AString& theString, int theNb=-1 )
|
||||||
: myString( theString ), myOrderNb( theNb ) {};
|
: myString( theString ), myOrderNb( theNb ) {};
|
||||||
_AString & GetString() { return myString; }
|
_AString & GetString() { return myString; }
|
||||||
int GetOrderNb() const { return myOrderNb; }
|
int GetOrderNb() const { return myOrderNb; }
|
||||||
void SetOrderNb( int theNb ) { myOrderNb = theNb; }
|
void SetOrderNb( int theNb ) { myOrderNb = theNb; }
|
||||||
typedef void* TAddr;
|
typedef void* TAddr;
|
||||||
TAddr GetAddress() const { return (void*) this; }
|
TAddr GetAddress() const { return (void*) this; }
|
||||||
int Length() const { return myString.Length(); }
|
int Length() const { return myString.Length(); }
|
||||||
void Clear() { myString.Clear(); myBegPos.Clear(); myArgs.Clear(); }
|
void Clear() { myString.Clear(); myBegPos.Clear(); myArgs.Clear(); }
|
||||||
bool IsEmpty() const { return myString.IsEmpty(); }
|
bool IsEmpty() const { return myString.IsEmpty(); }
|
||||||
_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 );
|
||||||
@ -183,11 +183,11 @@ public:
|
|||||||
const _pyID& GetID() { return myID.IsEmpty() ? myCreationCmd->GetResultValue() : myID; }
|
const _pyID& GetID() { return myID.IsEmpty() ? myCreationCmd->GetResultValue() : myID; }
|
||||||
static _pyID FatherID(const _pyID & childID);
|
static _pyID FatherID(const _pyID & childID);
|
||||||
const Handle(_pyCommand)& GetCreationCmd() { return myCreationCmd; }
|
const Handle(_pyCommand)& GetCreationCmd() { return myCreationCmd; }
|
||||||
int GetNbCalls() const { return myProcessedCmds.size(); }
|
int GetNbCalls() const { return myProcessedCmds.size(); }
|
||||||
bool IsInStudy() const { return myIsPublished; }
|
bool IsInStudy() const { return myIsPublished; }
|
||||||
virtual void SetRemovedFromStudy(const bool isRemoved) { myIsPublished = !isRemoved; }
|
virtual void SetRemovedFromStudy(const bool isRemoved) { myIsPublished = !isRemoved; }
|
||||||
void SetCreationCmd( Handle(_pyCommand) cmd ) { myCreationCmd = cmd; }
|
void SetCreationCmd( Handle(_pyCommand) cmd ) { myCreationCmd = cmd; }
|
||||||
int GetCommandNb() { return myCreationCmd->GetOrderNb(); }
|
int GetCommandNb() { return myCreationCmd->GetOrderNb(); }
|
||||||
void AddProcessedCmd( const Handle(_pyCommand) & cmd )
|
void AddProcessedCmd( const Handle(_pyCommand) & cmd )
|
||||||
{ if (myProcessedCmds.empty() || myProcessedCmds.back()!=cmd) myProcessedCmds.push_back( cmd );}
|
{ if (myProcessedCmds.empty() || myProcessedCmds.back()!=cmd) myProcessedCmds.push_back( cmd );}
|
||||||
std::list< Handle(_pyCommand) >& GetProcessedCmds() { return myProcessedCmds; }
|
std::list< Handle(_pyCommand) >& GetProcessedCmds() { return myProcessedCmds; }
|
||||||
|
Loading…
Reference in New Issue
Block a user