From 7468bfdc0b49e60009c985c917ed2bf652031b79 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 28 Feb 2012 07:47:56 +0000 Subject: [PATCH] 0021375: EDF 1671 SMESH: Dump study of current state Do not erase commands of hyps not used to compute mesh --- src/SMESH_I/SMESH_2smeshpy.cxx | 56 +++++++++++++++++----------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/SMESH_I/SMESH_2smeshpy.cxx b/src/SMESH_I/SMESH_2smeshpy.cxx index 983bdda97..c8fe9b6ab 100644 --- a/src/SMESH_I/SMESH_2smeshpy.cxx +++ b/src/SMESH_I/SMESH_2smeshpy.cxx @@ -2404,34 +2404,34 @@ bool _pyHypothesis::CanClear() void _pyHypothesis::ClearCommands() { - if ( !theGen->IsToKeepAllCommands() ) - { - bool isUsed = false; - int lastComputeOrder = 0; - list::iterator cmd = myComputeCmds.begin(); - for ( ; cmd != myComputeCmds.end(); ++cmd ) - if ( ! (*cmd)->IsEmpty() ) - { - isUsed = true; - if ( (*cmd)->GetOrderNb() > lastComputeOrder ) - lastComputeOrder = (*cmd)->GetOrderNb(); - } - if ( !isUsed ) - { - SetRemovedFromStudy( true ); - } - else - { - // clear my commands invoked after lastComputeOrder - // map >::iterator m2c; - // for ( m2c = myMeth2Commands.begin(); m2c != myMeth2Commands.end(); ++m2c ) - // { - // list< Handle(_pyCommand)> & cmds = m2c->second; - // if ( !cmds.empty() && cmds.back()->GetOrderNb() > lastComputeOrder ) - // cmds.back()->Clear(); - // } - } - } + // if ( !theGen->IsToKeepAllCommands() ) + // { + // bool isUsed = false; + // int lastComputeOrder = 0; + // list::iterator cmd = myComputeCmds.begin(); + // for ( ; cmd != myComputeCmds.end(); ++cmd ) + // if ( ! (*cmd)->IsEmpty() ) + // { + // isUsed = true; + // if ( (*cmd)->GetOrderNb() > lastComputeOrder ) + // lastComputeOrder = (*cmd)->GetOrderNb(); + // } + // if ( !isUsed ) + // { + // SetRemovedFromStudy( true ); + // } + // else + // { + // // clear my commands invoked after lastComputeOrder + // // map >::iterator m2c; + // // for ( m2c = myMeth2Commands.begin(); m2c != myMeth2Commands.end(); ++m2c ) + // // { + // // list< Handle(_pyCommand)> & cmds = m2c->second; + // // if ( !cmds.empty() && cmds.back()->GetOrderNb() > lastComputeOrder ) + // // cmds.back()->Clear(); + // // } + // } + // } _pyObject::ClearCommands(); } -- 2.39.2