]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #394 Undo-ing a Sketch element
authornds <natalia.donis@opencascade.com>
Thu, 12 Feb 2015 07:45:21 +0000 (10:45 +0300)
committernds <natalia.donis@opencascade.com>
Thu, 12 Feb 2015 07:45:21 +0000 (10:45 +0300)
src/ModuleBase/ModuleBase_ModelWidget.h
src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp
src/PartSet/CMakeLists.txt
src/PartSet/PartSet_Module.cpp
src/PartSet/PartSet_SketcherMgr.cpp
src/PartSet/PartSet_SketcherMgr.h
src/PartSet/PartSet_Tools.cpp
src/PartSet/PartSet_Tools.h
src/PartSet/PartSet_WidgetPoint2d.cpp
src/PartSet/PartSet_WidgetPoint2dDistance.cpp

index 44b43e4620d47749a322ad3b23e4f6c4175eb81a..87fcd1db749c2494f206f378505a80e7fb66f4cf 100644 (file)
@@ -142,6 +142,9 @@ signals:
   /// The signal about widget values changed
   void valuesChanged();
 
+  /// The signal about widget values changed
+  void controlValuesChanged();
+
   /// The signal about key release on the control, that corresponds to the attribute
   /// \param theEvent key release event
   void keyReleased(QKeyEvent* theEvent);
index 6b1f52ed35d161e778ccf891a49872adacddc8fb..6d17b4153dbb5bbeab749e80675a4eb708bcd218 100644 (file)
@@ -94,6 +94,7 @@ ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent,
   aControlLay->setStretch(1, 1);
 
   connect(mySpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(valuesChanged()));
+  connect(mySpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(controlValuesChanged()));
 }
 
 ModuleBase_WidgetDoubleValue::~ModuleBase_WidgetDoubleValue()
index 8c0eff95509abcfe7d2d04ecaad31d1ecb94be5e..280c107f6d893509c408498e56716c5cdc59ff5c 100644 (file)
@@ -74,6 +74,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/XGUI
                     ${CMAKE_SOURCE_DIR}/src/SketchPlugin
                     ${CMAKE_SOURCE_DIR}/src/FeaturesPlugin
                     ${CMAKE_SOURCE_DIR}/src/GeomAPI
+                    ${CMAKE_SOURCE_DIR}/src/AppElements
                     ${CAS_INCLUDE_DIRS}
                                        ${SUIT_INCLUDE}
 )
index c3b59579668d445b63acc6eff22d7ab3a6dac072..e1e18df38ca4d451e369bf84579e76e4278d637e 100644 (file)
@@ -186,9 +186,13 @@ void PartSet_Module::operationAborted(ModuleBase_Operation* theOperation)
 
 void PartSet_Module::operationStarted(ModuleBase_Operation* theOperation)
 {
-  if (theOperation->id().toStdString() == SketchPlugin_Sketch::ID()) {
+  if (PartSet_SketcherMgr::isSketchOperation(theOperation)) {
     mySketchMgr->startSketch(theOperation);
   }
+  else if (PartSet_SketcherMgr::isNestedSketchOperation(theOperation)) {
+    mySketchMgr->startNestedSketch(theOperation);
+  }
+
   if (myDocumentShapeFilter.IsNull())
     myDocumentShapeFilter = new PartSet_GlobalFilter(myWorkshop);
   myWorkshop->viewer()->addSelectionFilter(myDocumentShapeFilter);
@@ -196,15 +200,21 @@ void PartSet_Module::operationStarted(ModuleBase_Operation* theOperation)
 
 void PartSet_Module::operationStopped(ModuleBase_Operation* theOperation)
 {
-  if (theOperation->id().toStdString() == SketchPlugin_Sketch::ID()) {
+  if (PartSet_SketcherMgr::isSketchOperation(theOperation) ||
+      PartSet_SketcherMgr::isNestedSketchOperation(theOperation)) {
     mySketchMgr->stopSketch(theOperation);
   }
+  else if (PartSet_SketcherMgr::isNestedSketchOperation(theOperation)) {
+    mySketchMgr->stopNestedSketch(theOperation);
+  }
   myWorkshop->viewer()->removeSelectionFilter(myDocumentShapeFilter);
 }
 
 bool PartSet_Module::canDisplayObject(const ObjectPtr& theObject) const
 {
   bool aCanDisplay = false;
+  if (!mySketchMgr->canDisplayObject(theObject))
+    return aCanDisplay;
   CompositeFeaturePtr aSketchFeature = mySketchMgr->activeSketch();
   if (aSketchFeature.get() != NULL) {
     FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
@@ -238,7 +248,8 @@ bool PartSet_Module::canDisplayObject(const ObjectPtr& theObject) const
 
 void PartSet_Module::addViewerItems(QMenu* theMenu) const
 {
-  if (!isSketchOperationActive() && !isSketchFeatureOperationActive())
+  if (!PartSet_SketcherMgr::isSketchOperation(myWorkshop->currentOperation()) &&
+      !isSketchFeatureOperationActive())
     return;
   ModuleBase_ISelection* aSelection = myWorkshop->selection();
   QObjectPtrList aObjects = aSelection->selectedPresentations();
@@ -259,8 +270,7 @@ void PartSet_Module::addViewerItems(QMenu* theMenu) const
 void PartSet_Module::propertyPanelDefined(ModuleBase_Operation* theOperation)
 {
   ModuleBase_IPropertyPanel* aPanel = theOperation->propertyPanel();
-  if ((theOperation->id().toStdString() == SketchPlugin_Sketch::ID()) && 
-    (theOperation->isEditOperation())) {
+  if (PartSet_SketcherMgr::isSketchOperation(theOperation) &&  (theOperation->isEditOperation())) {
     // we have to manually activate the sketch label in edit mode
       aPanel->activateWidget(aPanel->modelWidgets().first());
       return;
@@ -289,20 +299,17 @@ void PartSet_Module::propertyPanelDefined(ModuleBase_Operation* theOperation)
     if (theOperation->isEditOperation()) {
       // TODO: #391 - to be removed
       std::string aId = theOperation->id().toStdString();
-      if (PartSet_SketcherMgr::sketchOperationIdList().contains(QString(aId.c_str()))) {
-        if ((aId == SketchPlugin_ConstraintRadius::ID()) ||
-            (aId == SketchPlugin_ConstraintLength::ID()) || 
-            (aId == SketchPlugin_ConstraintDistance::ID())) {
-          // Find and activate widget for management of point for dimension line position
-          QList<ModuleBase_ModelWidget*> aWidgets = aPanel->modelWidgets();
-          foreach (ModuleBase_ModelWidget* aWgt, aWidgets) {
-            PartSet_WidgetPoint2D* aPntWgt = dynamic_cast<PartSet_WidgetPoint2D*>(aWgt);
-            if (aPntWgt) {
-              aPanel->activateWidget(aPntWgt);
-              return;
-            }
+      if (PartSet_SketcherMgr::isNestedSketchOperation(theOperation) &&
+          PartSet_SketcherMgr::isDistanceOperation(theOperation)) {
+        // Find and activate widget for management of point for dimension line position
+        QList<ModuleBase_ModelWidget*> aWidgets = aPanel->modelWidgets();
+        foreach (ModuleBase_ModelWidget* aWgt, aWidgets) {
+          PartSet_WidgetPoint2D* aPntWgt = dynamic_cast<PartSet_WidgetPoint2D*>(aWgt);
+          if (aPntWgt) {
+            aPanel->activateWidget(aPntWgt);
+            return;
           }
-        } 
+        }
       }
     }
   }
@@ -319,7 +326,7 @@ void PartSet_Module::onSelectionChanged()
   // An edit operation is enable only if the current opeation is the sketch operation
   if (mySketchMgr->activeSketch()) {
     if (PartSet_Tools::sketchPlane(mySketchMgr->activeSketch()))
-      isSketcherOp = (aOperation->id().toStdString() == SketchPlugin_Sketch::ID());
+      isSketcherOp = PartSet_SketcherMgr::isSketchOperation(aOperation);
   }
   if (isSketcherOp) {
     // Editing of constraints can be done on selection
@@ -442,14 +449,6 @@ QWidget* PartSet_Module::createWidgetByType(const std::string& theType, QWidget*
     return 0;
 }
 
-bool PartSet_Module::isSketchOperationActive() const
-{
-  ModuleBase_Operation* aOperation = myWorkshop->currentOperation();
-
-  bool isSketchOp = aOperation && aOperation->id().toStdString() == SketchPlugin_Sketch::ID();
-  return isSketchOp;
-}
-
 bool PartSet_Module::isSketchFeatureOperationActive() const
 {
   bool isCurrentSketchOp = false;
@@ -497,7 +496,7 @@ void PartSet_Module::onAction(bool isChecked)
 
 void PartSet_Module::deleteObjects()
 {
-  bool isSketchOp = isSketchOperationActive();
+  bool isSketchOp = PartSet_SketcherMgr::isSketchOperation(myWorkshop->currentOperation());
   if (!isSketchOp && !isSketchFeatureOperationActive())
     return;
 
index 80fd683fef3c97a3d289cdb4cbced777e9b0fc52..70db7acc3661e2e2f71115d0ba899e48413c5ad1 100644 (file)
@@ -18,6 +18,8 @@
 #include <XGUI_ModuleConnector.h>
 #include <XGUI_PropertyPanel.h>
 
+#include <AppElements_MainWindow.h>
+
 #include <ModuleBase_IViewer.h>
 #include <ModuleBase_IWorkshop.h>
 #include <ModuleBase_IViewWindow.h>
@@ -106,7 +108,8 @@ void fillFeature2Attribute(const QList<ModuleBase_ViewerPrs>& theList,
 
 
 PartSet_SketcherMgr::PartSet_SketcherMgr(PartSet_Module* theModule)
-  : QObject(theModule), myModule(theModule), myIsDragging(false), myDragDone(false)
+  : QObject(theModule), myModule(theModule), myIsDragging(false), myDragDone(false),
+     myIsMouseOverWindow(false), myIsPropertyPanelValueChanged(false)
 {
   ModuleBase_IWorkshop* anIWorkshop = myModule->workshop();
   ModuleBase_IViewer* aViewer = anIWorkshop->viewer();
@@ -136,6 +139,22 @@ PartSet_SketcherMgr::~PartSet_SketcherMgr()
     myPlaneFilter.Nullify();
 }
 
+void PartSet_SketcherMgr::onMouseMoveOverWindow(bool theOverWindow)
+{
+  myIsMouseOverWindow = theOverWindow;
+  if (theOverWindow)
+    myIsPropertyPanelValueChanged = false;
+
+  updateVisibilityOfCreatedFeature();
+}
+
+void PartSet_SketcherMgr::onValuesChangedInPropertyPanel()
+{
+  myIsPropertyPanelValueChanged = true;
+
+  updateVisibilityOfCreatedFeature();
+}
+
 void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent)
 {
   get2dPoint(theWnd, theEvent, myClickedPoint);
@@ -166,8 +185,8 @@ void PartSet_SketcherMgr::onMousePressed(ModuleBase_IViewWindow* theWnd, QMouseE
     if (!PartSet_Tools::sketchPlane(myCurrentSketch))
       return;
 
-    bool isSketcher = (aOperation->id().toStdString() == SketchPlugin_Sketch::ID());
-    bool isSketchOpe = sketchOperationIdList().contains(aOperation->id());
+    bool isSketcher = isSketchOperation(aOperation);
+    bool isSketchOpe = isNestedSketchOperation(aOperation);
 
     // Avoid non-sketch operations
     if ((!isSketchOpe) && (!isSketcher))
@@ -234,8 +253,8 @@ void PartSet_SketcherMgr::onMouseReleased(ModuleBase_IViewWindow* theWnd, QMouse
     return;
   ModuleBase_Operation* aOp = aWorkshop->currentOperation();
   if (aOp) {
-    if (sketchOperationIdList().contains(aOp->id())) {
-  get2dPoint(theWnd, theEvent, myClickedPoint);
+    if (isNestedSketchOperation(aOp)) {
+      get2dPoint(theWnd, theEvent, myClickedPoint);
 
       // Only for sketcher operations
       if (myIsDragging) {
@@ -277,7 +296,7 @@ void PartSet_SketcherMgr::onMouseMoved(ModuleBase_IViewWindow* theWnd, QMouseEve
     ModuleBase_Operation* aOperation = myModule->workshop()->currentOperation();
     if (!aOperation)
       return;
-    if (aOperation->id().toStdString() == SketchPlugin_Sketch::ID())
+    if (isSketchOperation(aOperation))
       return; // No edit operation activated
 
     Handle(V3d_View) aView = theWnd->v3dView();
@@ -387,6 +406,9 @@ void PartSet_SketcherMgr::onApplicationStarted()
     connect(aPropertyPanel, SIGNAL(beforeWidgetActivated(ModuleBase_ModelWidget*)),
             this, SLOT(onBeforeWidgetActivated(ModuleBase_ModelWidget*)));
   }
+
+  AppElements_MainWindow* aMainWindow = aWorkshop->mainWindow();
+  connect(aMainWindow, SIGNAL(mouseMoveOverWindow(bool)), this, SLOT(onMouseMoveOverWindow(bool)));
 }
 
 void PartSet_SketcherMgr::onBeforeWidgetActivated(ModuleBase_ModelWidget* theWidget)
@@ -407,15 +429,6 @@ void PartSet_SketcherMgr::onBeforeWidgetActivated(ModuleBase_ModelWidget* theWid
   }
 }
 
-bool PartSet_SketcherMgr::isDistanceOperation(ModuleBase_Operation* theOperation) const
-{
-  std::string aId = theOperation ? theOperation->id().toStdString() : "";
-
-  return (aId == SketchPlugin_ConstraintLength::ID()) ||
-         (aId == SketchPlugin_ConstraintDistance::ID()) ||
-         (aId == SketchPlugin_ConstraintRadius::ID());
-}
-
 void PartSet_SketcherMgr::get2dPoint(ModuleBase_IViewWindow* theWnd, QMouseEvent* theEvent, 
                                      Point& thePoint)
 {
@@ -471,6 +484,26 @@ QStringList PartSet_SketcherMgr::sketchOperationIdList()
   return aIds;
 }
 
+bool PartSet_SketcherMgr::isSketchOperation(ModuleBase_Operation* theOperation)
+{
+  return theOperation && theOperation->id().toStdString() == SketchPlugin_Sketch::ID();
+}
+
+bool PartSet_SketcherMgr::isNestedSketchOperation(ModuleBase_Operation* theOperation)
+{
+  return theOperation &&
+         PartSet_SketcherMgr::sketchOperationIdList().contains(theOperation->id());
+}
+
+bool PartSet_SketcherMgr::isDistanceOperation(ModuleBase_Operation* theOperation)
+{
+  std::string aId = theOperation ? theOperation->id().toStdString() : "";
+
+  return (aId == SketchPlugin_ConstraintLength::ID()) ||
+         (aId == SketchPlugin_ConstraintDistance::ID()) ||
+         (aId == SketchPlugin_ConstraintRadius::ID());
+}
+
 void PartSet_SketcherMgr::startSketch(ModuleBase_Operation* theOperation)
 {
   // Display all sketcher sub-Objects
@@ -553,6 +586,20 @@ void PartSet_SketcherMgr::stopSketch(ModuleBase_Operation* theOperation)
   aDisplayer->updateViewer();
 }
 
+void PartSet_SketcherMgr::startNestedSketch(ModuleBase_Operation* )
+{
+  connectToPropertyPanel(true);
+}
+
+void PartSet_SketcherMgr::stopNestedSketch(ModuleBase_Operation* )
+{
+  connectToPropertyPanel(false);
+}
+
+bool PartSet_SketcherMgr::canDisplayObject(const ObjectPtr& theObject) const
+{
+  return myIsMouseOverWindow || myIsPropertyPanelValueChanged;
+}
 
 void PartSet_SketcherMgr::onPlaneSelected(const std::shared_ptr<GeomAPI_Pln>& thePln)
 {
@@ -679,3 +726,43 @@ void PartSet_SketcherMgr::getSelectionOwners(const FeaturePtr& theFeature,
     }
   }
 }
+
+void PartSet_SketcherMgr::connectToPropertyPanel(const bool isToConnect)
+{
+  ModuleBase_IWorkshop* anIWorkshop = myModule->workshop();
+  XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(anIWorkshop);
+  XGUI_Workshop* aWorkshop = aConnector->workshop();
+  XGUI_PropertyPanel* aPropertyPanel = aWorkshop->propertyPanel();
+  if (aPropertyPanel) {
+    const QList<ModuleBase_ModelWidget*>& aWidgets = aPropertyPanel->modelWidgets();
+    foreach (ModuleBase_ModelWidget* aWidget, aWidgets) {
+      if (isToConnect)
+        connect(aWidget, SIGNAL(controlValuesChanged()), this, SLOT(onValuesChangedInPropertyPanel()));
+      else
+        disconnect(aWidget, SIGNAL(controlValuesChanged()), this, SLOT(onValuesChangedInPropertyPanel()));
+    }
+  }
+}
+
+void PartSet_SketcherMgr::updateVisibilityOfCreatedFeature()
+{
+  ModuleBase_IWorkshop* aWorkshop = myModule->workshop();
+  ModuleBase_Operation* aOperation = aWorkshop->currentOperation();
+  if (!aOperation || aOperation->isEditOperation())
+    return;
+  XGUI_ModuleConnector* aConnector = dynamic_cast<XGUI_ModuleConnector*>(aWorkshop);
+  XGUI_Displayer* aDisplayer = aConnector->workshop()->displayer();
+
+  FeaturePtr aFeature = aOperation->feature();
+  std::list<ResultPtr> aResults = aFeature->results();
+  std::list<ResultPtr>::const_iterator aIt;
+  for (aIt = aResults.begin(); aIt != aResults.end(); ++aIt) {
+    if (canDisplayObject(aFeature)) {
+      aDisplayer->display(*aIt, false);
+    }
+    else {
+      aDisplayer->erase(*aIt, false);
+    }
+  }
+  aDisplayer->updateViewer();
+}
\ No newline at end of file
index 1507f92e98926f64a60d7ca38feb4210ca6e74f7..a08cf394162255f2f5aa3e2caf9c8fa076b644fb 100644 (file)
@@ -77,8 +77,20 @@ public:
 
   virtual ~PartSet_SketcherMgr();
 
-  /// Returns list of strings which contains id's of sketch operations
-  static QStringList sketchOperationIdList();
+  /// Returns true if the operation is the sketch
+  /// \param theOperation an operation
+  /// \return the boolean result
+  static bool isSketchOperation(ModuleBase_Operation* theOperation);
+
+  /// Returns true if the operation id is in the sketch operation id list
+  /// \param theOperation an operation
+  /// \return the boolean result
+  static bool isNestedSketchOperation(ModuleBase_Operation* theOperation);
+
+  /// Returns whethe the current operation is a sketch distance - lenght, distance or radius
+  /// \param the operation
+  /// \return a boolean value
+  static bool isDistanceOperation(ModuleBase_Operation* theOperation);
 
   /// Launches the operation from current highlighting
   void launchEditing();
@@ -92,12 +104,28 @@ public:
   /// Stops sketch operation
   void stopSketch(ModuleBase_Operation* );
 
+  /// Starts sketch operation
+  void startNestedSketch(ModuleBase_Operation* );
+
+  /// Stops sketch operation
+  void stopNestedSketch(ModuleBase_Operation* );
+
+  /// Returns whether the object can be displayed at the bounds of the active operation.
+  /// Display only current operation results for usual operation and ask the sketcher manager
+  /// if it is a sketch operation
+  /// \param theObject a model object
+  bool canDisplayObject(const ObjectPtr& theObject) const;
+
 public slots:
   /// Process sketch plane selected event
   void onPlaneSelected(const std::shared_ptr<GeomAPI_Pln>& thePln);
 
 
 private slots:
+  /// Process the signal about mouse moving into or out of the window
+  /// \param heOverWindow true, if the moving happens to window
+  void onMouseMoveOverWindow(bool theOverWindow);
+  void onValuesChangedInPropertyPanel();
   void onMousePressed(ModuleBase_IViewWindow*, QMouseEvent*);
   void onMouseReleased(ModuleBase_IViewWindow*, QMouseEvent*);
   void onMouseMoved(ModuleBase_IViewWindow*, QMouseEvent*);
@@ -106,10 +134,8 @@ private slots:
   void onBeforeWidgetActivated(ModuleBase_ModelWidget* theWidget);
 
 private:
-  /// Returns whethe the current operation is a sketch distance - lenght, distance or radius
-  /// \param the operation
-  /// \return a boolean value
-  bool isDistanceOperation(ModuleBase_Operation* theOperation) const;
+  /// Returns list of strings which contains id's of sketch operations
+  static QStringList sketchOperationIdList();
 
   /// Converts mouse position to 2d coordinates. 
   /// Member myCurrentSketch has to be correctly defined
@@ -163,12 +189,20 @@ private:
                                   const FeatureToSelectionMap& theSelection,
                                   SelectMgr_IndexedMapOfOwner& anOwnersToSelect);
 
+  /// Connects or disconnects to the value changed signal of the property panel widgets
+  /// \param isToConnect a boolean value whether connect or disconnect
+  void connectToPropertyPanel(const bool isToConnect);
+
+  void updateVisibilityOfCreatedFeature();
+
 private:
   PartSet_Module* myModule;
 
   bool myPreviousSelectionEnabled; // the previous selection enabled state in the viewer
   bool myIsDragging;
   bool myDragDone;
+  bool myIsMouseOverWindow; /// the state that mouse is over view
+  bool myIsPropertyPanelValueChanged; /// the state that value in the property panel is changed
   Point myCurrentPoint;
   Point myClickedPoint;
 
index 4bab36441129bfa093884895d0e14bb5f772ce49..e32410baf76b329c388dacd6047c739ba22456ee 100644 (file)
@@ -425,14 +425,6 @@ std::shared_ptr<GeomAPI_Pnt> PartSet_Tools::point3D(std::shared_ptr<GeomAPI_Pnt2
   return thePoint2D->to3D(aC->pnt(), aX->dir(), aY->dir());
 }
 
-bool PartSet_Tools::isConstraintFeature(const std::string& theKind)
-{
-  return theKind == SketchPlugin_ConstraintDistance::ID()
-      || theKind == SketchPlugin_ConstraintLength::ID()
-      || theKind == SketchPlugin_ConstraintRadius::ID()
-      || theKind == SketchPlugin_ConstraintRigid::ID();
-}
-
 ResultPtr PartSet_Tools::createFixedObjectByExternal(const TopoDS_Shape& theShape, 
                                                  const ObjectPtr& theObject, 
                                                  CompositeFeaturePtr theSketch)
index 4ff7da471a6d7a3fe7965a737dd6267f060d8236..854dd3b0eb1d5b5ae86e9c48bdf71b520ba75188 100644 (file)
@@ -144,10 +144,6 @@ class PARTSET_EXPORT PartSet_Tools
   /// \return API object of point 3D
   static std::shared_ptr<GeomAPI_Pnt> point3D(std::shared_ptr<GeomAPI_Pnt2d> thePoint2D,
                                                 CompositeFeaturePtr theSketch);
-  /// Check whether there is a constraint with the feature kind given
-  /// \param theKind a feature kind
-  /// \return the boolean value
-  static bool isConstraintFeature(const std::string& theKind);
 
   /// Creates a line (arc or circle) by given edge
   /// Created line will have fixed constraint
index d61d8d7481c00d80c4fe25e001b140520b01debd..34560cdc4713f53140e91604857c3568563658a2 100644 (file)
@@ -75,6 +75,7 @@ PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent,
     aGroupLay->addWidget(myXSpin, 0, 1);
 
     connect(myXSpin, SIGNAL(valueChanged(double)), this, SLOT(onValuesChanged()));
+    connect(myXSpin, SIGNAL(valueChanged(double)), this, SIGNAL(controlValuesChanged()));
   }
   {
     QLabel* aLabel = new QLabel(myGroupBox);
@@ -89,6 +90,7 @@ PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent,
     aGroupLay->addWidget(myYSpin, 1, 1);
 
     connect(myYSpin, SIGNAL(valueChanged(double)), this, SLOT(onValuesChanged()));
+    connect(myYSpin, SIGNAL(valueChanged(double)), this, SIGNAL(controlValuesChanged()));
   }
 }
 
index be108103444444fb9defbfc239b8f925efcddc31..b32ba144362f34571c5c8f14cbc66c950ecb06aa 100644 (file)
@@ -34,6 +34,7 @@ PartSet_WidgetPoint2dDistance::PartSet_WidgetPoint2dDistance(QWidget* theParent,
   // Reconnect to local slot
   disconnect(mySpinBox, SIGNAL(valueChanged(double)), this, SIGNAL(valuesChanged()));
   connect(mySpinBox, SIGNAL(valueChanged(double)), this, SLOT(onValuesChanged()));
+  connect(mySpinBox, SIGNAL(valueChanged(double)), this, SLOT(controlValuesChanged()));
 }
 
 PartSet_WidgetPoint2dDistance::~PartSet_WidgetPoint2dDistance()