]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Lock pre-highlighting of object
authorvsv <vsv@opencascade.com>
Mon, 20 Aug 2018 13:52:19 +0000 (16:52 +0300)
committervsv <vsv@opencascade.com>
Mon, 20 Aug 2018 13:52:19 +0000 (16:52 +0300)
src/XGUI/XGUI_ViewerProxy.cpp

index d763573e353fb6cccda447eec738675b03c3ffdf..8687cba0648e66485909f7e2492ff3f831f82dd5 100644 (file)
@@ -319,36 +319,37 @@ void XGUI_ViewerProxy::eraseHighlight()
 
 void XGUI_ViewerProxy::onMouseMove(AppElements_ViewWindow* theWnd, QMouseEvent* theEvent)
 {
-  Handle(AIS_InteractiveContext) aContext = AISContext();
-  if (!aContext.IsNull()) {
-    Handle(SelectMgr_EntityOwner) aOwner;
-    Handle(AIS_InteractiveObject) anIO;
-    ObjectPtr aObj;
-    bool isDisplayed = false;
-    XGUI_Displayer* aDisplayer = myWorkshop->displayer();
-    for (aContext->InitDetected(); aContext->MoreDetected(); aContext->NextDetected()) {
-      aOwner = aContext->DetectedOwner();
-      anIO = Handle(AIS_InteractiveObject)::DownCast(aOwner->Selectable());
-      aObj = aDisplayer->getObject(anIO);
-      if (aObj.get()) {
-        FeaturePtr aFeature = ModelAPI_Feature::feature(aObj);
-        if (aFeature.get()) {
-          if (aFeature != myFeature) {
-            eraseHighlight();
-            myFeature = aFeature;
-            displayHighlight();
-            aContext->UpdateCurrentViewer();
-          }
-          isDisplayed = true;
-        }
-      }
-    }
-    if (!isDisplayed) {
-      eraseHighlight();
-      aContext->UpdateCurrentViewer();
-      myFeature = FeaturePtr();
-    }
-  }
+  // vsv: Display prehighlighting of detected object
+  //Handle(AIS_InteractiveContext) aContext = AISContext();
+  //if (!aContext.IsNull()) {
+  //  Handle(SelectMgr_EntityOwner) aOwner;
+  //  Handle(AIS_InteractiveObject) anIO;
+  //  ObjectPtr aObj;
+  //  bool isDisplayed = false;
+  //  XGUI_Displayer* aDisplayer = myWorkshop->displayer();
+  //  for (aContext->InitDetected(); aContext->MoreDetected(); aContext->NextDetected()) {
+  //    aOwner = aContext->DetectedOwner();
+  //    anIO = Handle(AIS_InteractiveObject)::DownCast(aOwner->Selectable());
+  //    aObj = aDisplayer->getObject(anIO);
+  //    if (aObj.get()) {
+  //      FeaturePtr aFeature = ModelAPI_Feature::feature(aObj);
+  //      if (aFeature.get()) {
+  //        if (aFeature != myFeature) {
+  //          eraseHighlight();
+  //          myFeature = aFeature;
+  //          displayHighlight();
+  //          aContext->UpdateCurrentViewer();
+  //        }
+  //        isDisplayed = true;
+  //      }
+  //    }
+  //  }
+  //  if (!isDisplayed) {
+  //    eraseHighlight();
+  //    aContext->UpdateCurrentViewer();
+  //    myFeature = FeaturePtr();
+  //  }
+  //}
   emit mouseMove(theWnd, theEvent);
 }