From: spo Date: Wed, 9 Dec 2015 08:38:26 +0000 (+0300) Subject: Fix PointCoordindates to PointCoordinates in SketchPlugin X-Git-Tag: V_2.1.0~203 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a4687a33f6f7eef4ddd4ed60f504db937d905b9a;p=modules%2Fshaper.git Fix PointCoordindates to PointCoordinates in SketchPlugin --- diff --git a/src/PythonAPI/modeler/sketcher.py b/src/PythonAPI/modeler/sketcher.py index c3bad7c5c..95d10eafc 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("PointCoordindates") ).setValue(x, y) + geomDataAPI_Point2D( self.my.data().attribute("PointCoordinates") ).setValue(x, y) self.my.execute() def pointData (self): """Returns points attribute""" - return geomDataAPI_Point2D( self.my.data().attribute("PointCoordindates") ) + return geomDataAPI_Point2D( self.my.data().attribute("PointCoordinates") ) def result (self): """Returns result object""" diff --git a/src/SketchPlugin/SketchPlugin_Point.h b/src/SketchPlugin/SketchPlugin_Point.h index 59995ff43..1e1a4f65c 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("PointCoordindates"); + static const std::string MY_COORD_ID("PointCoordinates"); 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 1e0880e68..938c3af8a 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("PointCoordindates")) + aSketchPoint.attribute("PointCoordinates")) 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 b37b0f61d..8ff318091 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("PointCoordindates")) +coords = geomDataAPI_Point2D(aSketchPoint.attribute("PointCoordinates")) 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("PointCoordindates")) +coords = geomDataAPI_Point2D(aSketchPoint.attribute("PointCoordinates")) 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 a1986c159..11f3449fb 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 7e4ecaa96..2227b8971 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/PointCoordindates") + test.compare(str(findObject(":Distance.First object_QLineEdit").text), "SketchPoint_1/PointCoordinates") 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)