From: nds Date: Fri, 24 Jun 2016 12:07:03 +0000 (+0300) Subject: Issue #1597: Unknown error in sketch X-Git-Tag: V_2.4.0~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ebab0ebf181173e88a480a8a99f0eef86a5b3546;p=modules%2Fshaper.git Issue #1597: Unknown error in sketch --- diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index ea6063d39..0ae8ae3e5 100755 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -92,6 +93,7 @@ #include //#define DEBUG_DO_NOT_BY_ENTER +//#define DEBUG_SKETCHER_ENTITIES //#define DEBUG_CURSOR @@ -904,13 +906,20 @@ void PartSet_SketcherMgr::startSketch(ModuleBase_Operation* theOperation) aFeatureRefsToDelete, aPrefixInfo)) { if (!aFeatureRefsToDelete.empty()) anInvalidFeatures.insert(aFeatureRefsToDelete.begin(), aFeatureRefsToDelete.end()); - ModelAPI_Tools::removeFeatures(anInvalidFeatures, false); + ModelAPI_Tools::removeFeatures(anInvalidFeatures, true); + Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED)); + // TODO: call the next method in the XGUI_OperationMgr::onOperationStarted(). + workshop()->errorMgr()->updateAcceptAllAction(myCurrentSketch); } } // Display sketcher objects + QStringList anInfo; for (int i = 0; i < myCurrentSketch->numberOfSubs(); i++) { FeaturePtr aFeature = myCurrentSketch->subFeature(i); +#ifdef DEBUG_SKETCHER_ENTITIES + anInfo.append(ModuleBase_Tools::objectInfo(aFeature)); +#endif std::list aResults = aFeature->results(); std::list::const_iterator aIt; for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt) { @@ -918,6 +927,10 @@ void PartSet_SketcherMgr::startSketch(ModuleBase_Operation* theOperation) } aFeature->setDisplayed(true); } +#ifdef DEBUG_SKETCHER_ENTITIES + QString anInfoStr = anInfo.join(";\t"); + qDebug(QString("startSketch: %1, %2").arg(anInfo.size()).arg(anInfoStr).toStdString().c_str()); +#endif if(myCirclePointFilter.IsNull()) { myCirclePointFilter = new PartSet_CirclePointFilter(myModule->workshop());