]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge remote-tracking branch 'remotes/origin/master' into CEA_2019
authorazv <azv@opencascade.com>
Fri, 6 Sep 2019 11:20:21 +0000 (14:20 +0300)
committerazv <azv@opencascade.com>
Fri, 6 Sep 2019 11:20:21 +0000 (14:20 +0300)
# Conflicts:
# src/PartSet/PartSet_SketcherMgr.cpp

13 files changed:
1  2 
src/ModuleBase/ModuleBase_Tools.cpp
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_SketcherMgr.cpp
src/PartSet/PartSet_SketcherMgr.h
src/PartSet/PartSet_SketcherReentrantMgr.cpp
src/PartSet/PartSet_WidgetSketchLabel.cpp
src/SketchAPI/SketchAPI_Sketch.cpp
src/SketchAPI/SketchAPI_Sketch.h
src/SketchPlugin/plugin-Sketch.xml
src/XGUI/XGUI_ContextMenuMgr.cpp
src/XGUI/XGUI_PropertyPanel.cpp
src/XGUI/XGUI_Workshop.cpp

index eb66062e82e26fbb0d6736af81e64fbedfdf31e8,a3c4d0ebdbf3c7c874d2abc25315c6594763d22d..83d25c2ad8093b04cf335a8a458b206c748a9b7d
@@@ -152,10 -154,9 +154,9 @@@ void activateWindow(QWidget* theWidget
  
  void setFocus(QWidget* theWidget, const QString& theInfo)
  {
-   activateWindow(theWidget);
    theWidget->setFocus();
    // rectangle of focus is not visible on tool button widgets
 -  theWidget->repaint();
 +  theWidget->update();
  #ifdef DEBUG_SET_FOCUS
    qDebug(QString("setFocus: %1").arg(theInfo).toStdString().c_str());
  #endif
Simple merge
index 669e8ee95b27033438efc183368d96f1174621a6,e936d729bdd6952ba32ada7763f5cb52f6bf48df..1c4c03e07ac37eda0a63e73411c862524ba05dbe
@@@ -466,45 -466,27 +470,44 @@@ void PartSet_SketcherMgr::onMouseReleas
    bool aWasDragging = myIsDragging;
    myIsDragging = false;
  
 -  if (myModule->sketchReentranceMgr()->processMouseReleased(theWnd, theEvent))
 +  if (myModule->sketchReentranceMgr()->processMouseReleased(theWnd, theEvent)) {
      return;
 -
 +  }
    // if mouse is pressed when it was over view and at release the mouse is out of view, do nothing
 -  if (!myIsMouseOverViewProcessed)
 +  if (!myIsMouseOverViewProcessed) {
      return;
 -
 +  }
-   ModuleBase_IWorkshop* aWorkshop = myModule->workshop();
    ModuleBase_IViewer* aViewer = aWorkshop->viewer();
 -  if (!aViewer->canDragByMouse())
 -    return;
 -  ModuleBase_Operation* aOp = getCurrentOperation();
 +  //if (!aViewer->canDragByMouse())
 +  //  return;
 +  ModuleBase_OperationFeature* aOp =
 +      dynamic_cast<ModuleBase_OperationFeature*>(getCurrentOperation());
    if (aOp) {
 -    if (isNestedSketchOperation(aOp)) {
 -      // Only for sketcher operations
 -      if (aWasDragging) {
 -        if (myDragDone) {
 -          /// the previous selection is lost by mouse release in the viewer(Select method), but
 -          /// it is still stored in myCurrentSelection. So, it is possible to restore selection
 -          /// It is important for drag(edit with mouse) of sketch entities.
 -          restoreSelection(myCurrentSelection);
 -          myCurrentSelection.clear();
 +    bool aStartNoDragOperation = !aViewer->canDragByMouse() && aOp->isEditOperation();
 +    if (aStartNoDragOperation || myNoDragMoving) {
 +      // Process edit operation without dragging
 +      if (myCurrentSelection.size() > 0)
 +        myNoDragMoving = !myNoDragMoving;
 +      else
 +        myNoDragMoving = false;
 +      if (myNoDragMoving)
 +        return;
 +      else {
 +        restoreSelection(myCurrentSelection);
 +        myCurrentSelection.clear();
 +      }
 +    }
 +    else {
 +      if (isNestedSketchOperation(aOp)) {
 +        // Only for sketcher operations
 +        if (aWasDragging) {
 +          if (myDragDone) {
 +            /// the previous selection is lost by mouse release in the viewer(Select method), but
 +            /// it is still stored in myCurrentSelection. So, it is possible to restore selection
 +            /// It is important for drag(edit with mouse) of sketch entities.
 +            restoreSelection(myCurrentSelection);
 +            myCurrentSelection.clear();
 +          }
          }
        }
      }
Simple merge
Simple merge
Simple merge
Simple merge
index b1fadf67129ea2d66fb6b1571a25d16c88ff4c46,226aa30dda252dfedcba4bca6b533df7f10a1a5d..51f9fbec2bfd19da8cf104322a3fb1ca58862315
@@@ -346,9 -353,16 +353,18 @@@ void XGUI_ContextMenuMgr::updateObjectB
          action("SHOW_ONLY_CMD")->setEnabled(true);
          action("SHADING_CMD")->setEnabled(true);
          action("WIREFRAME_CMD")->setEnabled(true);
+         foreach(ObjectPtr aObj, aObjects) {
+           FeaturePtr aFeature = ModelAPI_Feature::feature(aObj);
+           if (!aFeature->isInHistory()) {
+             canBeDeleted = false;
+             break;
+           }
+         }
+         action("DELETE_CMD")->setEnabled(canBeDeleted);
        }
 +      if (hasFeature && myWorkshop->canMoveFeature())
 +        action("MOVE_CMD")->setEnabled(true);
      } // end multi-selection
  
      // Check folder management commands state if only features are selected
Simple merge
Simple merge