From 6cb2043929f085dc3d2e04aceb9c9163ce84c0f6 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 28 Jan 2015 15:06:13 +0300 Subject: [PATCH] Issue #391 Selection restore problem for sketch constraints The constraint text value should be selectable --- src/PartSet/PartSet_Module.cpp | 1 + src/PartSet/PartSet_SketcherMgr.cpp | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/PartSet/PartSet_Module.cpp b/src/PartSet/PartSet_Module.cpp index c0ea09cd9..7b14c01d9 100644 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@ -219,6 +219,7 @@ void PartSet_Module::propertyPanelDefined(ModuleBase_Operation* theOperation) } else { // Start editing constraint if (theOperation->isEditOperation()) { + // TODO: #391 - to be removed std::string aId = theOperation->id().toStdString(); if (PartSet_SketcherMgr::sketchOperationIdList().contains(QString(aId.c_str()))) { if ((aId == SketchPlugin_ConstraintRadius::ID()) || diff --git a/src/PartSet/PartSet_SketcherMgr.cpp b/src/PartSet/PartSet_SketcherMgr.cpp index 06fcc3371..018001423 100644 --- a/src/PartSet/PartSet_SketcherMgr.cpp +++ b/src/PartSet/PartSet_SketcherMgr.cpp @@ -45,6 +45,9 @@ #include #include +//#include +//#include + #include #include @@ -137,7 +140,6 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE { get2dPoint(theWnd, theEvent, myClickedPoint); - // if (!(theEvent->buttons() & Qt::LeftButton)) return; @@ -425,6 +427,12 @@ void PartSet_SketcherMgr::launchEditing() // point QIntList aModes; aModes << TopAbs_VERTEX << TopAbs_EDGE; + // TODO: #391 - to be uncommented + /*aModes.append(AIS_DSM_Text); + aModes.append(AIS_DSM_Line); + aModes.append(AIS_Shape::SelectionMode((TopAbs_ShapeEnum) TopAbs_VERTEX)); + aModes.append(AIS_Shape::SelectionMode((TopAbs_ShapeEnum) TopAbs_EDGE));*/ + XGUI_ModuleConnector* aConnector = dynamic_cast(myModule->workshop()); aConnector->activateSubShapesSelection(aModes); -- 2.39.2