]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'Dev_1.1.0' of newgeom:newgeom into Dev_1.1.0
authornds <natalia.donis@opencascade.com>
Thu, 2 Apr 2015 14:08:02 +0000 (17:08 +0300)
committernds <natalia.donis@opencascade.com>
Thu, 2 Apr 2015 14:08:02 +0000 (17:08 +0300)
1  2 
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_SketcherMgr.h

index be788bd5a89253f0b1c3ab76528bc7d41abb5e8b,8b16a24cda7eb1339d08d4ef7a65517a53679b2d..ee2f5727bc45521eedd43078d2a510425e5250ce
@@@ -8,7 -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>
@@@ -64,7 -63,6 +64,7 @@@
  
  #include <Events_Loop.h>
  #include <Config_PropManager.h>
 +#include <Config_Keywords.h>
  
  #include <StdSelect_TypeOfFace.hxx>
  #include <TopoDS_Vertex.hxx>
@@@ -280,8 -278,14 +280,8 @@@ bool PartSet_Module::canRedo() cons
  
  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
    return true;
  }
  
 +bool PartSet_Module::isMouseOverWindow()
 +{
 +  return mySketchMgr->isMouseOverWindow();
 +}
 +
  void PartSet_Module::propertyPanelDefined(ModuleBase_Operation* theOperation)
  {
    ModuleBase_IPropertyPanel* aPanel = theOperation->propertyPanel();
@@@ -495,9 -494,7 +495,9 @@@ ModuleBase_ModelWidget* PartSet_Module:
        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;
  }
  
@@@ -550,7 -547,7 +550,7 @@@ bool PartSet_Module::deleteObjects(
    // the abort leads to selection lost on constraint objects. It can be corrected after #386 issue
    XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(workshop());
    XGUI_Workshop* aWorkshop = aConnector->workshop();
-   ModuleBase_ISelection* aSel = aConnector->selection();
+   ModuleBase_ISelection* aSel = workshop()->selection();
    QObjectPtrList aSelectedObj = aSel->selectedPresentations();
    // if there are no selected objects in the viewer, that means that the selection in another
    // place cased this method. It is necessary to return the false value to understande in above
index 6f30ea45a915a0dd0f9b3f06c95733a3da5f4c0a,be687f220730ef4e12c3b68cc3b8d75d6f978da0..ed1ff7294d3c502b16f590fcc4378fd4eebbf2f7
@@@ -102,8 -102,6 +102,8 @@@ public
    /// \return a boolean value
    static bool isDistanceOperation(ModuleBase_Operation* theOperation);
  
 +  bool isMouseOverWindow() { return myIsMouseOverWindow; }
 +
    /// Returns current Sketch feature/ Returns NULL if there is no launched sketch operation
    CompositeFeaturePtr activeSketch() const { return myCurrentSketch; }
  
    /// \param isChecked if true, the feature is a construction
    void setAuxiliary(const bool isChecked);
  
+   /// Returns state of constraints showing flag 
    bool isConstraintsShown() const { return myIsConstraintsShown; }