]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'Dev_0.7.1' of newgeom:newgeom into Dev_0.7.1
authornds <natalia.donis@opencascade.com>
Mon, 26 Jan 2015 08:28:11 +0000 (11:28 +0300)
committernds <natalia.donis@opencascade.com>
Mon, 26 Jan 2015 08:28:11 +0000 (11:28 +0300)
Conflicts:
src/ModuleBase/ModuleBase_ModelWidget.h
src/PartSet/PartSet_SketcherMgr.cpp

1  2 
src/ModuleBase/ModuleBase_IPropertyPanel.h
src/ModuleBase/ModuleBase_ModelWidget.h
src/PartSet/PartSet_SketcherMgr.cpp
src/XGUI/XGUI_Workshop.cpp

index 3b0a4c5a4f92f72805cf69b8faaec216165d4393,35bd1632026d91a530505880b3f41c2c47746121..c4b2ec614f3a6db38f57c9ab4ac66b024247c8e1
@@@ -158,15 -165,21 +170,23 @@@ signals
    void moveObject(ObjectPtr theObj) const;
  
   protected:
-   std::string myAttributeID; /// the attribute name of the model feature
-   std::string myParentId;    /// name of parent
-   FeaturePtr myFeature;
  
-   bool myIsComputedDefault; /// Value should be computed on execute,
-                             /// like radius for circle's constraint (can not be zero)
+   /// The attribute name of the model feature
+   std::string myAttributeID; 
+   /// Name of parent
+   std::string myParentId;    
+   /// A feature which is processing by active operation
+   FeaturePtr myFeature;      
  
-   bool myIsValueDefault; /// the default value is defined in the XML for this attribute
-   bool myIsEditing;
+   /// Value should be computed on execute, like radius for circle's constraint (can not be zero)
+   bool myIsComputedDefault; 
 -                            
++                        
++  /// the default value is defined in the XML for this attribute    
++  bool myIsValueDefault;
+   /// Flag which shows that current operation is in editing mode
+   bool myIsEditing; 
  };
  
  #endif
index cce44aaa856d8a3a04c7f7fcfc1849eec8214c32,0da5482f9a72bfeb51b4f133c175f3ef6e9b85a6..bd8b15dd374cf64f4a89baa5f06a3df0c1edfb83
@@@ -190,8 -184,7 +193,7 @@@ void PartSet_SketcherMgr::onMousePresse
  
      if (isSketcher) {
        myIsDragging = true;
 -      get2dPoint(theWnd, theEvent, myCurX, myCurY);
 +      get2dPoint(theWnd, theEvent, myCurrentPoint);
        myDragDone = false;
        launchEditing();
  
@@@ -214,32 -207,28 +216,30 @@@ void PartSet_SketcherMgr::onMouseReleas
  {
    ModuleBase_IWorkshop* aWorkshop = myModule->workshop();
    ModuleBase_Operation* aOp = aWorkshop->currentOperation();
-   if (!aOp)
-     return;
-   if (!sketchOperationIdList().contains(aOp->id()))
-     return;
+   if (aOp) {
+     if (sketchOperationIdList().contains(aOp->id())) {
 +  get2dPoint(theWnd, theEvent, myClickedPoint);
 +
-   // Only for sketcher operations
-   ModuleBase_IViewer* aViewer = aWorkshop->viewer();
-   if (myIsDragging) {
-     aWorkshop->viewer()->enableSelection(myPreviousSelectionEnabled);
-     myIsDragging = false;
-     if (myDragDone) {
-       //aOp->commit();
-       myFeature2AttributeMap.clear();
-       // Reselect edited object
-       /*aViewer->AISContext()->MoveTo(theEvent->x(), theEvent->y(), theWnd->v3dView());
-       if (theEvent->modifiers() & Qt::ShiftModifier)
-         aViewer->AISContext()->ShiftSelect();
-       else
-         aViewer->AISContext()->Select();
-         */
-       return;
+       // Only for sketcher operations
+       ModuleBase_IViewer* aViewer = aWorkshop->viewer();
+       if (myIsDragging) {
+         if (myDragDone) {
+           //aOp->commit();
+           myFeature2AttributeMap.clear();
+           // Reselect edited object
+           /*aViewer->AISContext()->MoveTo(theEvent->x(), theEvent->y(), theWnd->v3dView());
+           if (theEvent->modifiers() & Qt::ShiftModifier)
+             aViewer->AISContext()->ShiftSelect();
+           else
+             aViewer->AISContext()->Select();
+             */
+         }
+       }
      }
    }
+   aWorkshop->viewer()->enableSelection(myPreviousSelectionEnabled);
+   myIsDragging = false;
  }
  
  void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)
Simple merge