From: nds Date: Mon, 29 Dec 2014 17:01:26 +0000 (+0300) Subject: Remove multiSelection flag set, because it is enoght to set selectionEnabled flag... X-Git-Tag: V_0.7.0_rc1~6^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=324b5ffd3830679a39bc2e4c5037c2312576ca00;p=modules%2Fshaper.git Remove multiSelection flag set, because it is enoght to set selectionEnabled flag in false between move-release functionality. There is a bug in SALOME 7.5.1, after it is fixed, the NewGeom_SalomeViewer should be corrected. --- diff --git a/src/NewGeom/NewGeom_SalomeViewer.cpp b/src/NewGeom/NewGeom_SalomeViewer.cpp index b1810b0e9..d83e344d4 100644 --- a/src/NewGeom/NewGeom_SalomeViewer.cpp +++ b/src/NewGeom/NewGeom_SalomeViewer.cpp @@ -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); } //********************************************** diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 434d98c90..2dd071fb5 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -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)