]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PartSet/PartSet_Module.cpp
Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom into Dev_1.1.0
[modules/shaper.git] / src / PartSet / PartSet_Module.cpp
index 8b16a24cda7eb1339d08d4ef7a65517a53679b2d..ee2f5727bc45521eedd43078d2a510425e5250ce 100644 (file)
@@ -8,6 +8,7 @@
 #include <PartSet_WidgetPoint2dDistance.h>
 #include <PartSet_WidgetShapeSelector.h>
 #include <PartSet_WidgetConstraintShapeSelector.h>
+#include <PartSet_WidgetEditor.h>
 #include <PartSet_SketcherMgr.h>
 
 #include <ModuleBase_Operation.h>
@@ -63,6 +64,7 @@
 
 #include <Events_Loop.h>
 #include <Config_PropManager.h>
+#include <Config_Keywords.h>
 
 #include <StdSelect_TypeOfFace.hxx>
 #include <TopoDS_Vertex.hxx>
@@ -278,14 +280,8 @@ bool PartSet_Module::canRedo() const
 
 bool PartSet_Module::canDisplayObject(const ObjectPtr& theObject) const
 {
-  // the display should be possible almost always, with exception of some specific cases
-
-  bool aCanDisplay = true;
-
-  if (mySketchMgr->activeSketch()) {
-    aCanDisplay = mySketchMgr->canDisplayObject(theObject);
-  }
-  return aCanDisplay;
+  // the sketch manager put the restriction to the objects display
+  return mySketchMgr->canDisplayObject(theObject);
 }
 
 bool PartSet_Module::addViewerItems(QMenu* theMenu, const QMap<QString, QAction*>& theStdActions) const
@@ -319,6 +315,11 @@ bool PartSet_Module::addViewerItems(QMenu* theMenu, const QMap<QString, QAction*
   return true;
 }
 
+bool PartSet_Module::isMouseOverWindow()
+{
+  return mySketchMgr->isMouseOverWindow();
+}
+
 void PartSet_Module::propertyPanelDefined(ModuleBase_Operation* theOperation)
 {
   ModuleBase_IPropertyPanel* aPanel = theOperation->propertyPanel();
@@ -494,7 +495,9 @@ ModuleBase_ModelWidget* PartSet_Module::createWidgetByType(const std::string& th
       new PartSet_WidgetConstraintShapeSelector(theParent, workshop(), theWidgetApi, theParentId);
     aConstraintShapeSelectorWgt->setSketcher(mySketchMgr->activeSketch());
     aWgt = aConstraintShapeSelectorWgt;
-  }
+  } if (theType == WDG_DOUBLEVALUE_EDITOR) {
+    aWgt = new PartSet_WidgetEditor(theParent, workshop(), theWidgetApi, theParentId);
+  } 
   return aWgt;
 }