mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-16 02:20:33 +05:00
0051789: TC7.2.0: NoteBook cannot update study
Fix for "NumberOfSegmants" contained in "LayerDistribution" hypothesis
This commit is contained in:
parent
21a7cf3d64
commit
daf037da97
@ -3051,18 +3051,23 @@ void _pyNumberOfSegmentsHyp::Flush()
|
||||
list<Handle(_pyCommand)>::reverse_iterator cmd = myUnusedCommands.rbegin();
|
||||
int distrTypeNb = 0;
|
||||
for ( ; !distrTypeNb && cmd != myUnusedCommands.rend(); ++cmd )
|
||||
if ( (*cmd)->GetMethod() == "SetDistrType" )
|
||||
distrTypeNb = (*cmd)->GetOrderNb();
|
||||
else if (IsWrapped() && (*cmd)->GetMethod() == "SetObjectEntry" )
|
||||
if ( (*cmd)->GetMethod() == "SetDistrType" ) {
|
||||
if ( cmd != myUnusedCommands.rbegin() )
|
||||
distrTypeNb = (*cmd)->GetOrderNb();
|
||||
}
|
||||
else if (IsWrapped() && (*cmd)->GetMethod() == "SetObjectEntry" ) {
|
||||
(*cmd)->Clear();
|
||||
|
||||
}
|
||||
// clear commands before the last SetDistrType()
|
||||
list<Handle(_pyCommand)> * cmds[2] = { &myArgCommands, &myUnusedCommands };
|
||||
set< int > treatedCmdNbs; // avoid treating same cmd twice
|
||||
for ( int i = 0; i < 2; ++i ) {
|
||||
set<TCollection_AsciiString> uniqueMethods;
|
||||
list<Handle(_pyCommand)> & cmdList = *cmds[i];
|
||||
for ( cmd = cmdList.rbegin(); cmd != cmdList.rend(); ++cmd )
|
||||
{
|
||||
if ( !treatedCmdNbs.insert( (*cmd)->GetOrderNb() ).second )
|
||||
continue;// avoid treating same cmd twice
|
||||
bool clear = ( (*cmd)->GetOrderNb() < distrTypeNb );
|
||||
const TCollection_AsciiString& method = (*cmd)->GetMethod();
|
||||
if ( !clear || method == "SetNumberOfSegments" ) {
|
||||
|
Loading…
Reference in New Issue
Block a user