]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Output information about sketch entitites on mouse move
authornds <nds@opencascade.com>
Thu, 1 Sep 2016 04:49:07 +0000 (07:49 +0300)
committernds <nds@opencascade.com>
Thu, 1 Sep 2016 04:49:07 +0000 (07:49 +0300)
src/PartSet/PartSet_SketcherMgr.cpp

index 24256731d1ca82ba43ebc8a48815b5d4289b0e49..677b430cca54dab167f5cbcc176c6ae91ef124f2 100755 (executable)
@@ -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))