From 801131b41013eeb97fe917311b47bff78fb86d86 Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 1 Sep 2016 07:49:07 +0300 Subject: [PATCH] Output information about sketch entitites on mouse move --- src/PartSet/PartSet_SketcherMgr.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 24256731d..677b430cc 100755 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -442,14 +442,16 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve { #ifdef DEBUG_SKETCH_ENTITIES_ON_MOVE CompositeFeaturePtr aSketch = activeSketch(); - std::cout << "SKETCH FEATURES (before split) [" << aSketch->numberOfSubs() << "]:" << std::endl; - QStringList anInfo; - for (int i = 0, aNbSubs = aSketch->numberOfSubs(); i < aNbSubs; i++) { - //std::cout << getFeatureInfo(aSketch->subFeature(i), false) << std::endl; - anInfo.append(ModuleBase_Tools::objectInfo(aSketch->subFeature(i))); + if (aSketch.get()) { + std::cout << "mouse move SKETCH FEATURES [" << aSketch->numberOfSubs() << "]:" << std::endl; + QStringList anInfo; + for (int i = 0, aNbSubs = aSketch->numberOfSubs(); i < aNbSubs; i++) { + //std::cout << getFeatureInfo(aSketch->subFeature(i), false) << std::endl; + anInfo.append(ModuleBase_Tools::objectInfo(aSketch->subFeature(i))); + } + QString anInfoStr = anInfo.join("\n"); + qDebug(QString("%1").arg(anInfo.size()).arg(anInfoStr).toStdString().c_str()); } - QString anInfoStr = anInfo.join(";\t"); - qDebug(QString("onFeatureUpdatedMsg: %1, %2").arg(anInfo.size()).arg(anInfoStr).toStdString().c_str()); #endif if (myModule->sketchReentranceMgr()->processMouseMoved(theWnd, theEvent)) -- 2.39.2