From: nds Date: Thu, 1 Sep 2016 04:49:07 +0000 (+0300) Subject: Output information about sketch entitites on mouse move X-Git-Tag: V_2.5.0~91 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=801131b41013eeb97fe917311b47bff78fb86d86;p=modules%2Fshaper.git Output information about sketch entitites on mouse move --- 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))