]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Bugfix for radius constraint creation
authorsbh <sergey.belash@opencascade.com>
Tue, 30 Sep 2014 13:00:12 +0000 (17:00 +0400)
committersbh <sergey.belash@opencascade.com>
Tue, 30 Sep 2014 13:00:12 +0000 (17:00 +0400)
src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp
src/ModuleBase/ModuleBase_WidgetPoint2D.cpp
src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
src/PartSet/PartSet_OperationFeatureCreate.cpp
src/XGUI/XGUI_OperationMgr.cpp
src/XGUI/XGUI_PropertyPanel.cpp

index 6d470dbbd14567860f40444e50068f7f1ce2b6e6..48620cbdc8961d6f4262be001c6853ba0d19c20b 100644 (file)
@@ -92,8 +92,6 @@ ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent,
   aControlLay->setStretch(1, 1);
 
   connect(mySpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(valuesChanged()));
-
-  mySpinBox->installEventFilter(this);
 }
 
 ModuleBase_WidgetDoubleValue::~ModuleBase_WidgetDoubleValue()
index 8feec7a6c5e96aa9f7d7983c0d4e7af82a8b9cf7..3271fe7230c73712831a8c049b6bff39351955f4 100644 (file)
@@ -66,8 +66,6 @@ ModuleBase_WidgetPoint2D::ModuleBase_WidgetPoint2D(QWidget* theParent,
 
     connect(myYSpin, SIGNAL(valueChanged(double)), this, SIGNAL(valuesChanged()));
   }
-  myXSpin->installEventFilter(this);
-  myYSpin->installEventFilter(this);
 }
 
 ModuleBase_WidgetPoint2D::~ModuleBase_WidgetPoint2D()
index e0c12b1973b8ba8d4534b33f5593dc83a72d619d..fcd287c550aa76f95be3b69a00ddccffd1374d3e 100644 (file)
@@ -72,7 +72,6 @@ ModuleBase_WidgetShapeSelector::ModuleBase_WidgetShapeSelector(QWidget* theParen
   myTextLine = new QLineEdit(myContainer);
   myTextLine->setReadOnly(true);
   myTextLine->setToolTip(aToolTip);
-  myTextLine->installEventFilter(this);
 
   myBasePalet = myTextLine->palette();
   myInactivePalet = myBasePalet;
@@ -273,4 +272,4 @@ bool ModuleBase_WidgetShapeSelector::eventFilter(QObject* theObj, QEvent* theEve
       activateSelection(true);
   }
   return ModuleBase_ModelWidget::eventFilter(theObj, theEvent);
-}
\ No newline at end of file
+}
index 1e7e3468b2796b014ee8412ce0650632b65c437b..b9c2326eede96207ef4e6dc9b360acd5a17808af 100644 (file)
@@ -67,8 +67,10 @@ bool PartSet_OperationFeatureCreate::canProcessKind(const std::string& theId)
 
 bool PartSet_OperationFeatureCreate::canBeCommitted() const
 {
-  if (PartSet_OperationSketchBase::canBeCommitted())
-    return !myActiveWidget;
+  if (PartSet_OperationSketchBase::canBeCommitted()) {
+    //if(myActiveWidget && !myActiveWidget->isComputedDefault()) {
+    return isValid();
+  }
   return false;
 }
 
@@ -145,11 +147,12 @@ void PartSet_OperationFeatureCreate::mouseReleased(QMouseEvent* theEvent, Handle
     emit activateNextWidget(myActiveWidget);
   }
 
-  if (commit() && !isClosedContour) {
-    // if the point creation is finished, the next mouse release should commit the modification
-    // the next release can happens by double click in the viewer
-    restartOperation(feature()->getKind(), feature());
-    return;
+  if (myActiveWidget == NULL) {
+    if(commit() && !isClosedContour) {
+      // if the point creation is finished, the next mouse release should commit the modification
+      // the next release can happens by double click in the viewer
+      restartOperation(feature()->getKind(), feature());
+    }
   }
 }
 
index 04559839683a23f29219419d68b8b5a8652acabe..88d5f89dea17ccbf7c669de34b6a0cb9c423a60a 100644 (file)
@@ -228,9 +228,6 @@ bool XGUI_OperationMgr::onKeyReleased(QKeyEvent* theEvent)
       break;
     case Qt::Key_Return:
     case Qt::Key_Enter: {
-      if(anOperation) {
-         anOperation->activateNextToCurrentWidget();
-      }
       commitOperation();
     }
       break;
index 9a5877369ba5a51254ba151fc696429a48688a00..14ae5b6d94d49a51a78f5681ca56715da59bfffb 100644 (file)
@@ -131,6 +131,7 @@ void XGUI_PropertyPanel::updateContentWidget(FeaturePtr theFeature)
 
 void XGUI_PropertyPanel::onActivateNextWidget(ModuleBase_ModelWidget* theWidget)
 {
+  QObject* aSender = sender();
   ModuleBase_ModelWidget* aNextWidget = 0;
   QList<ModuleBase_ModelWidget*>::const_iterator anIt = myWidgets.begin(), aLast = myWidgets.end();
   bool isFoundWidget = false;