Salome HOME
23061: [CEA 1488] Import 1D-2D fails sometimes in relation with the source face discr...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MakeNodeAtPointDlg.cxx
index 970500e69d7f60d60c8abd5e20da97d695ab7b48..f67581cff16c54d3c5608a9b732b70915e76070f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -716,17 +716,17 @@ void SMESHGUI_MakeNodeAtPointOp::redisplayPreview()
                 myDlg->myDestinationZ->SetValue(z);
               }
               if ( myDestCoordChanged ) {
-                dx = myDlg->myDestinationX->GetValue() - myDlg->myCurrentX->GetValue();
-                dy = myDlg->myDestinationY->GetValue() - myDlg->myCurrentY->GetValue();
-                dz = myDlg->myDestinationZ->GetValue() - myDlg->myCurrentZ->GetValue();
+                dx = myDlg->myDestinationX->GetValue() - x;
+                dy = myDlg->myDestinationY->GetValue() - y;
+                dz = myDlg->myDestinationZ->GetValue() - z;
                 myDlg->myDestDX->SetValue(dx);
                 myDlg->myDestDY->SetValue(dy);
                 myDlg->myDestDZ->SetValue(dz);
               }
               else {
-                dx = myDlg->myDestDX->GetValue() + myDlg->myCurrentX->GetValue();;
-                dy = myDlg->myDestDY->GetValue() + myDlg->myCurrentY->GetValue();;
-                dz = myDlg->myDestDZ->GetValue() + myDlg->myCurrentZ->GetValue();;
+                dx = myDlg->myDestDX->GetValue() + x;
+                dy = myDlg->myDestDY->GetValue() + y;
+                dz = myDlg->myDestDZ->GetValue() + z;
                 myDlg->myDestinationX->SetValue(dx);
                 myDlg->myDestinationY->SetValue(dy);
                 myDlg->myDestinationZ->SetValue(dz);