From: nds Date: Mon, 11 Apr 2016 04:53:58 +0000 (+0300) Subject: Issue #1393 Angle constraint : incorrect angle displayed. solution: arc's passed... X-Git-Tag: V_2.3.0~254 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6990c2add12839d22ca65c87629c39f506c8bdb6;p=modules%2Fshaper.git Issue #1393 Angle constraint : incorrect angle displayed. solution: arc's passed point correction --- diff --git a/src/ModuleBase/ModuleBase_ISelection.h b/src/ModuleBase/ModuleBase_ISelection.h index 65badd60f..510ec76de 100644 --- a/src/ModuleBase/ModuleBase_ISelection.h +++ b/src/ModuleBase/ModuleBase_ISelection.h @@ -78,13 +78,6 @@ class ModuleBase_ISelection //! Returns list of currently selected QModelIndexes virtual ObjectPtr getSelectableObject(const Handle_SelectMgr_EntityOwner& theOwner) const = 0; - //! Returns list of currently selected shapes and their owners (objects). - //! Both lists are synchronized - //! \param theList returning list of selected AIS objects - //! \param theOwners list of objects - virtual void selectedShapes(NCollection_List& theList, - std::list& theOwners) const = 0; - //! Return the shape from the viewer presentation. //! If the shape is equal to the shape of selected object, it returns an empty shape //! \param thePrs a selected object diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index f259ca6af..1563bad48 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -493,18 +493,11 @@ void PartSet_WidgetPoint2D::onMouseRelease(ModuleBase_IViewWindow* theWnd, QMous QList aList = aSelection->getSelected(ModuleBase_ISelection::Viewer); ModuleBase_ViewerPrsPtr aFirstValue = aList.size() > 0 ? aList.first() : ModuleBase_ViewerPrsPtr(); - //NCollection_List aShapes; - //std::list aObjects; - //aSelection->selectedShapes(aShapes, aObjects); // if we have selection and use it - //if (/*aShapes.Extent() > 0 && useSelectedShapes() &&*/ isValidSelectionCustom() { if (aFirstValue.get() && isValidSelectionCustom(aFirstValue)) { - //TopoDS_Shape aShape = aShapes.First(); - //ObjectPtr aObject = aObjects.front(); - GeomShapePtr aGeomShape = aFirstValue->shape(); - TopoDS_Shape aShape = aGeomShape->impl(); /// to find axis shape - ObjectPtr aObject = aFirstValue->object(); /// to find owner + TopoDS_Shape aShape = aGeomShape->impl(); + ObjectPtr aObject = aFirstValue->object(); FeaturePtr aSelectedFeature = ModelAPI_Feature::feature(aObject); bool anExternal = false; diff --git a/src/XGUI/XGUI_Selection.cpp b/src/XGUI/XGUI_Selection.cpp index 07fcafc61..6091e71f4 100644 --- a/src/XGUI/XGUI_Selection.cpp +++ b/src/XGUI/XGUI_Selection.cpp @@ -293,33 +293,6 @@ ObjectPtr XGUI_Selection::getSelectableObject(const Handle(SelectMgr_EntityOwner return anObject; } -//************************************************************** -void XGUI_Selection::selectedShapes(NCollection_List& theList, - std::list& theOwners) const -{ - theList.Clear(); - Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext(); - if (aContext.IsNull()) - return; - - for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected()) { - TopoDS_Shape aShape = aContext->SelectedShape(); - if (aShape.IsNull()) { - aShape = findAxisShape(aContext->SelectedInteractive()); - } - if (!aShape.IsNull()) { - theList.Append(aShape); - Handle(SelectMgr_EntityOwner) aEO = aContext->SelectedOwner(); - if (!aEO.IsNull()) { - Handle(AIS_InteractiveObject) anObj = - Handle(AIS_InteractiveObject)::DownCast(aEO->Selectable()); - ObjectPtr anObject = myWorkshop->displayer()->getObject(anObj); - theOwners.push_back(anObject); - } - } - } -} - //************************************************************** void XGUI_Selection::selectedOwners(SelectMgr_IndexedMapOfOwner& theSelectedOwners) const { diff --git a/src/XGUI/XGUI_Selection.h b/src/XGUI/XGUI_Selection.h index 570820e2c..8cd8d7cc6 100644 --- a/src/XGUI/XGUI_Selection.h +++ b/src/XGUI/XGUI_Selection.h @@ -75,10 +75,6 @@ class XGUI_EXPORT XGUI_Selection : public ModuleBase_ISelection /// \return a found object or NULL ObjectPtr getSelectableObject(const Handle(SelectMgr_EntityOwner)& theOwner) const; - //! Returns list of currently selected shapes - virtual void selectedShapes(NCollection_List& theShapes, - std::list& theOwners) const; - //! Returns list of currently selected owners /// \return list of owners void selectedOwners(SelectMgr_IndexedMapOfOwner& theSelectedOwners) const;