]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Remove multiSelection flag set, because it is enoght to set selectionEnabled flag...
authornds <natalia.donis@opencascade.com>
Mon, 29 Dec 2014 17:01:26 +0000 (20:01 +0300)
committernds <natalia.donis@opencascade.com>
Mon, 29 Dec 2014 17:01:26 +0000 (20:01 +0300)
src/NewGeom/NewGeom_SalomeViewer.cpp
src/PartSet/PartSet_SketcherMgr.cpp

index b1810b0e9ca183777d8fc38d5af4602d5d74abfe..d83e344d46255d409815931935d172f88acd1815 100644 (file)
@@ -188,12 +188,11 @@ void NewGeom_SalomeViewer::onActivated(SUIT_ViewWindow*)
 //**********************************************
 void NewGeom_SalomeViewer::enableSelection(bool isEnabled)
 {
-  mySelector->viewer()->enableSelection(isEnabled);
-  // there is a fix for a black-colored window 
-  // the viewer rubber band is valid if the values delta is less than 1
-  // TODO: remove this row after moving to SALOME 7.5
-  //mySelector->viewer()->setInteractionStyle(isEnabled ? SUIT_ViewModel::STANDARD
-  //                                                    : SUIT_ViewModel::KEY_FREE);
+  //mySelector->viewer()->enableSelection(isEnabled);
+  // The enableSelection() in SALOME 7.5 cause of forced Viewer update(we have blinking)
+  // After this is corrected, the first row should be recommented, the last - removed
+  mySelector->viewer()->setInteractionStyle(isEnabled ? SUIT_ViewModel::STANDARD
+                                                      : SUIT_ViewModel::KEY_FREE);
 }
 
 //**********************************************
index 434d98c9086693dc70031db173af59ceacfbb016..2dd071fb5509bbf3d137521695060843a2ea8631 100644 (file)
@@ -184,7 +184,6 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE
 
       get2dPoint(theWnd, theEvent, myCurX, myCurY);
       myDragDone = false;
-      aWorkshop->viewer()->enableMultiselection(false);
       launchEditing();
 
     } else if (isSketchOpe && isEditing) {
@@ -194,7 +193,6 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE
       myIsDragging = true;
       get2dPoint(theWnd, theEvent, myCurX, myCurY);
       myDragDone = false;
-      aWorkshop->viewer()->enableMultiselection(false);
 
       // This is necessary in order to finalize previous operation
       QApplication::processEvents();
@@ -218,7 +216,6 @@ void PartSet_SketcherMgr::onMouseReleased(ModuleBase_IViewWindow* theWnd, QMouse
     aWorkshop->viewer()->enableSelection(myPreviousSelectionEnabled);
     myIsDragging = false;
     if (myDragDone) {
-      aViewer->enableMultiselection(true);
       //aOp->commit();
       myFeature2AttributeMap.clear();
 
@@ -232,9 +229,6 @@ void PartSet_SketcherMgr::onMouseReleased(ModuleBase_IViewWindow* theWnd, QMouse
       return;
     }
   }
-  if (!aViewer->isMultiSelectionEnabled()) {
-    aViewer->enableMultiselection(true);
-  }
 }
 
 void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)