From bf77656be8adb44ea166a982f3484ba499cb4c04 Mon Sep 17 00:00:00 2001 From: spo Date: Mon, 14 Dec 2015 09:33:05 +0300 Subject: [PATCH] Revert back: Fix PointCoordindates to PointCoordinates in SketchPlugin. Problem with backward compatibility in stores studies. --- src/PythonAPI/model/sketcher/point.py | 2 +- src/PythonAPI/modeler/sketcher.py | 4 ++-- src/SketchPlugin/SketchPlugin_Point.h | 2 +- src/SketchPlugin/Test/TestConstraintDistance.py | 2 +- src/SketchPlugin/Test/TestSketchPointLine.py | 4 ++-- src/SketchPlugin/plugin-Sketch.xml | 2 +- test.squish/suite_STANDALONE/tst_DISTANCE/test.py | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/PythonAPI/model/sketcher/point.py b/src/PythonAPI/model/sketcher/point.py index 603a6234a..ce6c2839a 100644 --- a/src/PythonAPI/model/sketcher/point.py +++ b/src/PythonAPI/model/sketcher/point.py @@ -12,7 +12,7 @@ class Point(Interface): # Initialize attributes of the feature self._point_data = geomDataAPI_Point2D( - self._feature.data().attribute("PointCoordinates") + self._feature.data().attribute("PointCoordindates") ) self.setValue(x, y) self.execute() diff --git a/src/PythonAPI/modeler/sketcher.py b/src/PythonAPI/modeler/sketcher.py index 95d10eafc..c3bad7c5c 100644 --- a/src/PythonAPI/modeler/sketcher.py +++ b/src/PythonAPI/modeler/sketcher.py @@ -183,12 +183,12 @@ class Point(): """Constructor""" ### Create the feature self.my = sketch.addFeature("SketchPoint") - geomDataAPI_Point2D( self.my.data().attribute("PointCoordinates") ).setValue(x, y) + geomDataAPI_Point2D( self.my.data().attribute("PointCoordindates") ).setValue(x, y) self.my.execute() def pointData (self): """Returns points attribute""" - return geomDataAPI_Point2D( self.my.data().attribute("PointCoordinates") ) + return geomDataAPI_Point2D( self.my.data().attribute("PointCoordindates") ) def result (self): """Returns result object""" diff --git a/src/SketchPlugin/SketchPlugin_Point.h b/src/SketchPlugin/SketchPlugin_Point.h index 1e1a4f65c..59995ff43 100644 --- a/src/SketchPlugin/SketchPlugin_Point.h +++ b/src/SketchPlugin/SketchPlugin_Point.h @@ -28,7 +28,7 @@ class SketchPlugin_Point : public SketchPlugin_SketchEntity /// Coordinates of the point inline static const std::string& COORD_ID() { - static const std::string MY_COORD_ID("PointCoordinates"); + static const std::string MY_COORD_ID("PointCoordindates"); return MY_COORD_ID; } /// Returns the kind of a feature diff --git a/src/SketchPlugin/Test/TestConstraintDistance.py b/src/SketchPlugin/Test/TestConstraintDistance.py index 938c3af8a..1e0880e68 100644 --- a/src/SketchPlugin/Test/TestConstraintDistance.py +++ b/src/SketchPlugin/Test/TestConstraintDistance.py @@ -59,7 +59,7 @@ aSession.finishOperation() aSession.startOperation() aSketchPoint = aSketchFeature.addFeature("SketchPoint") aSketchPointCoords = geomDataAPI_Point2D( - aSketchPoint.attribute("PointCoordinates")) + aSketchPoint.attribute("PointCoordindates")) aSketchPointCoords.setValue(50., 50.) aSketchLine = aSketchFeature.addFeature("SketchLine") aLineAStartPoint = geomDataAPI_Point2D(aSketchLine.attribute("StartPoint")) diff --git a/src/SketchPlugin/Test/TestSketchPointLine.py b/src/SketchPlugin/Test/TestSketchPointLine.py index 8ff318091..b37b0f61d 100644 --- a/src/SketchPlugin/Test/TestSketchPointLine.py +++ b/src/SketchPlugin/Test/TestSketchPointLine.py @@ -46,7 +46,7 @@ assert (len(aSketchReflist.list()) == 0) # aSketchPoint = aDocument.addFeature("SketchPoint") aSketchPoint = aSketchFeature.addFeature("SketchPoint") assert (aSketchPoint.getKind() == "SketchPoint") -coords = geomDataAPI_Point2D(aSketchPoint.attribute("PointCoordinates")) +coords = geomDataAPI_Point2D(aSketchPoint.attribute("PointCoordindates")) assert (coords.x() == 0) assert (coords.y() == 0) assert (not coords.isInitialized()) @@ -58,7 +58,7 @@ aSession.finishOperation() aSketchReflist = aSketchFeature.reflist("Features") assert (aSketchReflist.size() == 1) assert (len(aSketchReflist.list()) == 1) -coords = geomDataAPI_Point2D(aSketchPoint.attribute("PointCoordinates")) +coords = geomDataAPI_Point2D(aSketchPoint.attribute("PointCoordindates")) assert (coords.x() == 10.0) assert (coords.y() == 10.0) #========================================================================= diff --git a/src/SketchPlugin/plugin-Sketch.xml b/src/SketchPlugin/plugin-Sketch.xml index 11f3449fb..a1986c159 100644 --- a/src/SketchPlugin/plugin-Sketch.xml +++ b/src/SketchPlugin/plugin-Sketch.xml @@ -18,7 +18,7 @@ - + diff --git a/test.squish/suite_STANDALONE/tst_DISTANCE/test.py b/test.squish/suite_STANDALONE/tst_DISTANCE/test.py index 2227b8971..7e4ecaa96 100644 --- a/test.squish/suite_STANDALONE/tst_DISTANCE/test.py +++ b/test.squish/suite_STANDALONE/tst_DISTANCE/test.py @@ -9,7 +9,7 @@ def sketch(): mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), annotaion_point[0], annotaion_point[1], 0, Qt.LeftButton) waitFor("object.exists(':Distance.First object_QLineEdit')", 20000) - test.compare(str(findObject(":Distance.First object_QLineEdit").text), "SketchPoint_1/PointCoordinates") + test.compare(str(findObject(":Distance.First object_QLineEdit").text), "SketchPoint_1/PointCoordindates") waitFor("object.exists(':Distance.Second object_QLineEdit')", 20000) test.compare(str(findObject(":Distance.Second object_QLineEdit").text), "SketchLine_1") waitFor("object.exists(':Distance.ConstraintValue_ModuleBase_ParamSpinBox')", 20000) -- 2.39.2