X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_SketcherMgr.cpp;h=81945bbd47f3d1625bacd730172936e98d31d288;hb=32208dedf0b2b5bd50b5b86c464f37a8e0eb07d0;hp=f76d3318cab4f98dc4b5d496c6824537c934d6f4;hpb=44db5b97e8d5e94a05dd5c844898af23f8e987e9;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index f76d3318c..81945bbd4 100755 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -266,6 +266,8 @@ void PartSet_SketcherMgr::onLeaveViewPort() aDisplayer->enableUpdateViewer(isEnableUpdateViewer); } +/* +//Temporary commented as we do not modify values in property panel void PartSet_SketcherMgr::onBeforeValuesChangedInPropertyPanel() { if (!isNestedEditOperation(getCurrentOperation(), myModule->sketchMgr()->activeSketch()) || @@ -299,9 +301,8 @@ void PartSet_SketcherMgr::onAfterValuesChangedInPropertyPanel() XGUI_Displayer* aDisplayer = aConnector->workshop()->displayer(); aDisplayer->enableUpdateViewer(myPreviousUpdateViewerEnabled); aDisplayer->updateViewer(); - - } +*/ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent) { @@ -375,9 +376,6 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE myDragDone = false; myPreviousDrawModeEnabled = aViewer->enableDrawMode(false); - // selection should be restored before edit operation start to process the - // selected entities, e.g. selection of point(attribute on a line) should edit the point - restoreSelection(); launchEditing(); if (aFeature.get() != NULL) { std::shared_ptr aSPFeature = @@ -395,16 +393,17 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE } else if (isSketchOpe && isEditing) { // If selected another object commit current result bool aPrevLaunchingState = myIsEditLaunching; - myIsEditLaunching = true; + /// store editing state for Edit operation in order to do not clear highlight by restart + /// of edit operation. + /// Internal edit should not be stored as editing operation as the result will be a + /// creation operation, where previous selection should not be used(and will be cleared) + myIsEditLaunching = !myModule->sketchReentranceMgr()->isInternalEditActive(); aFOperation->commit(); myIsDragging = true; myDragDone = false; myPreviousDrawModeEnabled = aViewer->enableDrawMode(false); - // selection should be restored before edit operation start to process the - // selected entities, e.g. selection of point(attribute on a line) should edit the point - restoreSelection(); launchEditing(); myIsEditLaunching = aPrevLaunchingState; if (aFeature.get() != NULL) { @@ -420,7 +419,6 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE aFPAttr->setValue(myCurrentPoint.myCurX, myCurrentPoint.myCurY); } } - restoreSelection(); } } } @@ -1533,6 +1531,7 @@ void PartSet_SketcherMgr::getSelectionOwners(const FeaturePtr& theFeature, void PartSet_SketcherMgr::connectToPropertyPanel(ModuleBase_ModelWidget* theWidget, const bool isToConnect) { + /*Temporary commented as we do not modify values in property panel if (isToConnect) { connect(theWidget, SIGNAL(beforeValuesChanged()), this, SLOT(onBeforeValuesChangedInPropertyPanel())); @@ -1544,7 +1543,7 @@ void PartSet_SketcherMgr::connectToPropertyPanel(ModuleBase_ModelWidget* theWidg this, SLOT(onBeforeValuesChangedInPropertyPanel())); disconnect(theWidget, SIGNAL(afterValuesChanged()), this, SLOT(onAfterValuesChangedInPropertyPanel())); - } + }*/ } void PartSet_SketcherMgr::widgetStateChanged(int thePreviousState) @@ -1714,12 +1713,12 @@ void PartSet_SketcherMgr::restoreSelection() FeatureToSelectionMap::const_iterator aSIt = myCurrentSelection.begin(), aSLast = myCurrentSelection.end(); SelectMgr_IndexedMapOfOwner anOwnersToSelect; + anOwnersToSelect.Clear(); for (; aSIt != aSLast; aSIt++) { - anOwnersToSelect.Clear(); getSelectionOwners(aSIt.key(), myCurrentSketch, aWorkshop, myCurrentSelection, anOwnersToSelect); - aConnector->workshop()->selector()->setSelectedOwners(anOwnersToSelect, false); } + aConnector->workshop()->selector()->setSelectedOwners(anOwnersToSelect, false); } void PartSet_SketcherMgr::onShowConstraintsToggle(int theType, bool theState)