From: nds Date: Mon, 26 Jan 2015 08:28:11 +0000 (+0300) Subject: Merge branch 'Dev_0.7.1' of newgeom:newgeom into Dev_0.7.1 X-Git-Tag: V_1.0.0~22^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d499ef7358a4dc4ce020054fc94ef04c22e9e444;p=modules%2Fshaper.git Merge branch 'Dev_0.7.1' of newgeom:newgeom into Dev_0.7.1 Conflicts: src/ModuleBase/ModuleBase_ModelWidget.h src/PartSet/PartSet_SketcherMgr.cpp --- d499ef7358a4dc4ce020054fc94ef04c22e9e444 diff --cc src/ModuleBase/ModuleBase_ModelWidget.h index 3b0a4c5a4,35bd16320..c4b2ec614 --- a/src/ModuleBase/ModuleBase_ModelWidget.h +++ b/src/ModuleBase/ModuleBase_ModelWidget.h @@@ -158,15 -165,21 +170,23 @@@ signals void moveObject(ObjectPtr theObj) const; protected: - std::string myAttributeID; /// the attribute name of the model feature - std::string myParentId; /// name of parent - FeaturePtr myFeature; - bool myIsComputedDefault; /// Value should be computed on execute, - /// like radius for circle's constraint (can not be zero) + /// The attribute name of the model feature + std::string myAttributeID; + + /// Name of parent + std::string myParentId; + + /// A feature which is processing by active operation + FeaturePtr myFeature; - bool myIsValueDefault; /// the default value is defined in the XML for this attribute - bool myIsEditing; + /// Value should be computed on execute, like radius for circle's constraint (can not be zero) + bool myIsComputedDefault; - ++ ++ /// the default value is defined in the XML for this attribute ++ bool myIsValueDefault; + /// Flag which shows that current operation is in editing mode + bool myIsEditing; }; #endif diff --cc src/PartSet/PartSet_SketcherMgr.cpp index cce44aaa8,0da5482f9..bd8b15dd3 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@@ -190,8 -184,7 +193,7 @@@ void PartSet_SketcherMgr::onMousePresse if (isSketcher) { myIsDragging = true; - - get2dPoint(theWnd, theEvent, myCurX, myCurY); + get2dPoint(theWnd, theEvent, myCurrentPoint); myDragDone = false; launchEditing(); @@@ -214,32 -207,28 +216,30 @@@ void PartSet_SketcherMgr::onMouseReleas { ModuleBase_IWorkshop* aWorkshop = myModule->workshop(); ModuleBase_Operation* aOp = aWorkshop->currentOperation(); - if (!aOp) - return; - if (!sketchOperationIdList().contains(aOp->id())) - return; - + if (aOp) { + if (sketchOperationIdList().contains(aOp->id())) { + get2dPoint(theWnd, theEvent, myClickedPoint); + - // Only for sketcher operations - ModuleBase_IViewer* aViewer = aWorkshop->viewer(); - if (myIsDragging) { - aWorkshop->viewer()->enableSelection(myPreviousSelectionEnabled); - myIsDragging = false; - if (myDragDone) { - //aOp->commit(); - myFeature2AttributeMap.clear(); - - // Reselect edited object - /*aViewer->AISContext()->MoveTo(theEvent->x(), theEvent->y(), theWnd->v3dView()); - if (theEvent->modifiers() & Qt::ShiftModifier) - aViewer->AISContext()->ShiftSelect(); - else - aViewer->AISContext()->Select(); - */ - return; + // Only for sketcher operations + ModuleBase_IViewer* aViewer = aWorkshop->viewer(); + if (myIsDragging) { + if (myDragDone) { + //aOp->commit(); + myFeature2AttributeMap.clear(); + + // Reselect edited object + /*aViewer->AISContext()->MoveTo(theEvent->x(), theEvent->y(), theWnd->v3dView()); + if (theEvent->modifiers() & Qt::ShiftModifier) + aViewer->AISContext()->ShiftSelect(); + else + aViewer->AISContext()->Select(); + */ + } + } } } + aWorkshop->viewer()->enableSelection(myPreviousSelectionEnabled); + myIsDragging = false; } void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)