mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-16 04:50:36 +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();
|
list<Handle(_pyCommand)>::reverse_iterator cmd = myUnusedCommands.rbegin();
|
||||||
int distrTypeNb = 0;
|
int distrTypeNb = 0;
|
||||||
for ( ; !distrTypeNb && cmd != myUnusedCommands.rend(); ++cmd )
|
for ( ; !distrTypeNb && cmd != myUnusedCommands.rend(); ++cmd )
|
||||||
if ( (*cmd)->GetMethod() == "SetDistrType" )
|
if ( (*cmd)->GetMethod() == "SetDistrType" ) {
|
||||||
distrTypeNb = (*cmd)->GetOrderNb();
|
if ( cmd != myUnusedCommands.rbegin() )
|
||||||
else if (IsWrapped() && (*cmd)->GetMethod() == "SetObjectEntry" )
|
distrTypeNb = (*cmd)->GetOrderNb();
|
||||||
|
}
|
||||||
|
else if (IsWrapped() && (*cmd)->GetMethod() == "SetObjectEntry" ) {
|
||||||
(*cmd)->Clear();
|
(*cmd)->Clear();
|
||||||
|
}
|
||||||
// clear commands before the last SetDistrType()
|
// clear commands before the last SetDistrType()
|
||||||
list<Handle(_pyCommand)> * cmds[2] = { &myArgCommands, &myUnusedCommands };
|
list<Handle(_pyCommand)> * cmds[2] = { &myArgCommands, &myUnusedCommands };
|
||||||
|
set< int > treatedCmdNbs; // avoid treating same cmd twice
|
||||||
for ( int i = 0; i < 2; ++i ) {
|
for ( int i = 0; i < 2; ++i ) {
|
||||||
set<TCollection_AsciiString> uniqueMethods;
|
set<TCollection_AsciiString> uniqueMethods;
|
||||||
list<Handle(_pyCommand)> & cmdList = *cmds[i];
|
list<Handle(_pyCommand)> & cmdList = *cmds[i];
|
||||||
for ( cmd = cmdList.rbegin(); cmd != cmdList.rend(); ++cmd )
|
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 );
|
bool clear = ( (*cmd)->GetOrderNb() < distrTypeNb );
|
||||||
const TCollection_AsciiString& method = (*cmd)->GetMethod();
|
const TCollection_AsciiString& method = (*cmd)->GetMethod();
|
||||||
if ( !clear || method == "SetNumberOfSegments" ) {
|
if ( !clear || method == "SetNumberOfSegments" ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user