]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1393 Angle constraint : incorrect angle displayed. solution: arc's passed...
authornds <nds@opencascade.com>
Mon, 11 Apr 2016 04:53:58 +0000 (07:53 +0300)
committernds <nds@opencascade.com>
Mon, 11 Apr 2016 05:05:36 +0000 (08:05 +0300)
src/ModuleBase/ModuleBase_ISelection.h
src/PartSet/PartSet_WidgetPoint2d.cpp
src/XGUI/XGUI_Selection.cpp
src/XGUI/XGUI_Selection.h

index 65badd60f096ca26d28b5ebeff1096a46497be14..510ec76de97e4678bbf2e4c77e6b2eaa20dcca2b 100644 (file)
@@ -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<TopoDS_Shape>& theList, 
-    std::list<ObjectPtr>& 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
index f259ca6afae5da9a9c325053890d4960c92c67ff..1563bad48275b235b70426fcce1ff90e488f2d41 100644 (file)
@@ -493,18 +493,11 @@ void PartSet_WidgetPoint2D::onMouseRelease(ModuleBase_IViewWindow* theWnd, QMous
 
   QList<ModuleBase_ViewerPrsPtr> aList = aSelection->getSelected(ModuleBase_ISelection::Viewer);
   ModuleBase_ViewerPrsPtr aFirstValue = aList.size() > 0 ? aList.first() : ModuleBase_ViewerPrsPtr();
-  //NCollection_List<TopoDS_Shape> aShapes;
-  //std::list<ObjectPtr> 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<TopoDS_Shape>(); /// to find axis shape
-    ObjectPtr aObject = aFirstValue->object(); /// to find owner
+    TopoDS_Shape aShape = aGeomShape->impl<TopoDS_Shape>();
+    ObjectPtr aObject = aFirstValue->object();
 
     FeaturePtr aSelectedFeature = ModelAPI_Feature::feature(aObject);
     bool anExternal = false;
index 07fcafc613a47684e1ae3d049b507a1f81ebe0fc..6091e71f40f739945710091312cc5aab0a7aaa2a 100644 (file)
@@ -293,33 +293,6 @@ ObjectPtr XGUI_Selection::getSelectableObject(const Handle(SelectMgr_EntityOwner
   return anObject;
 }
 
-//**************************************************************
-void XGUI_Selection::selectedShapes(NCollection_List<TopoDS_Shape>& theList, 
-                                    std::list<ObjectPtr>& 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
 {
index 570820e2c7744ecb022fc6f7287729eed2c935d3..8cd8d7cc6fd2b816c7485a2b1dcd3716d173a051 100644 (file)
@@ -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<TopoDS_Shape>& theShapes, 
-    std::list<ObjectPtr>& theOwners) const;
-
   //! Returns list of currently selected owners
   /// \return list of owners
   void selectedOwners(SelectMgr_IndexedMapOfOwner& theSelectedOwners) const;