From 4d2877866ef659991fe1823d73f674d0facc00ef Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 31 Mar 2017 15:46:18 +0300 Subject: [PATCH] Correct misprint in name of "Coordinates" attribute of SketchPlugin_Point --- src/BuildPlugin/Test/TestSubShapes.py | 4 ++-- src/BuildPlugin/Test/TestVertex.py | 4 ++-- src/SketchPlugin/SketchPlugin_Point.h | 2 +- src/SketchPlugin/SketchPlugin_msg_en.ts | 6 +++--- src/SketchPlugin/Test/TestConstraintCoincidence.py | 2 +- src/SketchPlugin/Test/TestConstraintDistance.py | 2 +- src/SketchPlugin/Test/TestConstraintMiddlePoint.py | 2 +- src/SketchPlugin/Test/TestCreateCircleByCenterAndPassed.py | 2 +- src/SketchPlugin/Test/TestCreateCircleByThreePoints.py | 2 +- src/SketchPlugin/Test/TestMultiRotation.py | 2 +- src/SketchPlugin/Test/TestSketchPointLine.py | 4 ++-- src/SketchPlugin/plugin-Sketch.xml | 2 +- test.squish/suite_STANDALONE/tst_DISTANCE/test.py | 2 +- 13 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/BuildPlugin/Test/TestSubShapes.py b/src/BuildPlugin/Test/TestSubShapes.py index 1453d8af7..d4f0ddd0a 100644 --- a/src/BuildPlugin/Test/TestSubShapes.py +++ b/src/BuildPlugin/Test/TestSubShapes.py @@ -8,8 +8,8 @@ import random def createPoint(theSketchFeature): aSketchPointFeature = theSketchFeature.addFeature("SketchPoint") - aPointCoordindates = geomDataAPI_Point2D(aSketchPointFeature.attribute("PointCoordindates")) - aPointCoordindates.setValue(random.uniform(0, 50), random.uniform(0, 50)) + aPointCoordinates = geomDataAPI_Point2D(aSketchPointFeature.attribute("PointCoordinates")) + aPointCoordinates.setValue(random.uniform(0, 50), random.uniform(0, 50)) return aSketchPointFeature def createLine(theSketchFeature): diff --git a/src/BuildPlugin/Test/TestVertex.py b/src/BuildPlugin/Test/TestVertex.py index be6c50e79..237283590 100644 --- a/src/BuildPlugin/Test/TestVertex.py +++ b/src/BuildPlugin/Test/TestVertex.py @@ -8,8 +8,8 @@ import random def createPoint(theSketchFeature): aSketchPointFeature = theSketchFeature.addFeature("SketchPoint") - aPointCoordindates = geomDataAPI_Point2D(aSketchPointFeature.attribute("PointCoordindates")) - aPointCoordindates.setValue(random.uniform(0, 100), random.uniform(0, 100)) + aPointCoordinates = geomDataAPI_Point2D(aSketchPointFeature.attribute("PointCoordinates")) + aPointCoordinates.setValue(random.uniform(0, 100), random.uniform(0, 100)) return aSketchPointFeature # Get document diff --git a/src/SketchPlugin/SketchPlugin_Point.h b/src/SketchPlugin/SketchPlugin_Point.h index 142d0915a..562b50098 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/SketchPlugin_msg_en.ts b/src/SketchPlugin/SketchPlugin_msg_en.ts index f4f41f841..2fcae36b3 100755 --- a/src/SketchPlugin/SketchPlugin_msg_en.ts +++ b/src/SketchPlugin/SketchPlugin_msg_en.ts @@ -571,14 +571,14 @@ SketchPoint:Model_FeatureValidator - Attribute "PointCoordindates" is not initialized. + Attribute "PointCoordinates" is not initialized. Point is not defined - SketchPoint:PointCoordindates + SketchPoint:PointCoordinates - Attribute "PointCoordindates" is locked by modification value in the viewer. + Attribute "PointCoordinates" is locked by modification value in the viewer. Select a point diff --git a/src/SketchPlugin/Test/TestConstraintCoincidence.py b/src/SketchPlugin/Test/TestConstraintCoincidence.py index 893242aa9..27def860c 100644 --- a/src/SketchPlugin/Test/TestConstraintCoincidence.py +++ b/src/SketchPlugin/Test/TestConstraintCoincidence.py @@ -173,7 +173,7 @@ assert (anOrigRes) anOrigShape = anOrigRes.shape() assert (anOrigShape) anOrigin = aSketchFeature.addFeature("SketchPoint") -anOriginCoord = geomDataAPI_Point2D(anOrigin.attribute("PointCoordindates")) +anOriginCoord = geomDataAPI_Point2D(anOrigin.attribute("PointCoordinates")) anOriginCoord.setValue(0., 0.) anOrigin.selection("External").setValue(anOrigRes, anOrigShape) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestConstraintDistance.py b/src/SketchPlugin/Test/TestConstraintDistance.py index 47a67e6ec..a5c80ae7c 100644 --- a/src/SketchPlugin/Test/TestConstraintDistance.py +++ b/src/SketchPlugin/Test/TestConstraintDistance.py @@ -69,7 +69,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/TestConstraintMiddlePoint.py b/src/SketchPlugin/Test/TestConstraintMiddlePoint.py index d8e69beb8..558c9ab78 100644 --- a/src/SketchPlugin/Test/TestConstraintMiddlePoint.py +++ b/src/SketchPlugin/Test/TestConstraintMiddlePoint.py @@ -145,7 +145,7 @@ assert (anOrigRes) anOrigShape = anOrigRes.shape() assert (anOrigShape) anOrigin = aSketchFeature.addFeature("SketchPoint") -anOriginCoord = geomDataAPI_Point2D(anOrigin.attribute("PointCoordindates")) +anOriginCoord = geomDataAPI_Point2D(anOrigin.attribute("PointCoordinates")) anOriginCoord.setValue(0., 0.) anOrigin.selection("External").setValue(anOrigRes, anOrigShape) aSession.finishOperation() diff --git a/src/SketchPlugin/Test/TestCreateCircleByCenterAndPassed.py b/src/SketchPlugin/Test/TestCreateCircleByCenterAndPassed.py index e37ec2f58..35f55de79 100644 --- a/src/SketchPlugin/Test/TestCreateCircleByCenterAndPassed.py +++ b/src/SketchPlugin/Test/TestCreateCircleByCenterAndPassed.py @@ -139,7 +139,7 @@ aPrevCenter = geomDataAPI_Point2D(aPrevCircle.attribute("circle_center")) aPointCoodinates = [0., 0.] aSession.startOperation() aPoint = aSketchFeature.addFeature("SketchPoint") -aPointCoord = geomDataAPI_Point2D(aPoint.attribute("PointCoordindates")) +aPointCoord = geomDataAPI_Point2D(aPoint.attribute("PointCoordinates")) aPointCoord.setValue(aPointCoodinates[0], aPointCoodinates[1]) aSession.finishOperation() # create new circle diff --git a/src/SketchPlugin/Test/TestCreateCircleByThreePoints.py b/src/SketchPlugin/Test/TestCreateCircleByThreePoints.py index ce9a24d4a..8998bb931 100644 --- a/src/SketchPlugin/Test/TestCreateCircleByThreePoints.py +++ b/src/SketchPlugin/Test/TestCreateCircleByThreePoints.py @@ -137,7 +137,7 @@ aLineStart = [10., 0.] aLineEnd = [10., 50.] aSession.startOperation() aPoint = aSketchFeature.addFeature("SketchPoint") -aPointCoord = geomDataAPI_Point2D(aPoint.attribute("PointCoordindates")) +aPointCoord = geomDataAPI_Point2D(aPoint.attribute("PointCoordinates")) aPointCoord.setValue(aPointCoodinates[0], aPointCoodinates[1]) aLine = aSketchFeature.addFeature("SketchLine") aStartPnt = geomDataAPI_Point2D(aLine.attribute("StartPoint")) diff --git a/src/SketchPlugin/Test/TestMultiRotation.py b/src/SketchPlugin/Test/TestMultiRotation.py index 6a6d19201..905117ae3 100644 --- a/src/SketchPlugin/Test/TestMultiRotation.py +++ b/src/SketchPlugin/Test/TestMultiRotation.py @@ -127,7 +127,7 @@ ANGLE = 30. #========================================================================= aSession.startOperation() aRotationPoint = aSketchFeature.addFeature("SketchPoint") -aRotationPointPoint = geomDataAPI_Point2D(aRotationPoint.attribute("PointCoordindates")) +aRotationPointPoint = geomDataAPI_Point2D(aRotationPoint.attribute("PointCoordinates")) aRotationPointPoint.setValue(CENTER_X, CENTER_Y) aSession.finishOperation() assert(model.dof(aSketchFeature) == 7) diff --git a/src/SketchPlugin/Test/TestSketchPointLine.py b/src/SketchPlugin/Test/TestSketchPointLine.py index 0d3df2d14..382a53418 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 (not coords.isInitialized()) # Simulate SketchPlugin_Point::move(...) coords.setValue(10., 10.) @@ -56,7 +56,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 f2aa6ed5f..e19081739 100644 --- a/src/SketchPlugin/plugin-Sketch.xml +++ b/src/SketchPlugin/plugin-Sketch.xml @@ -32,7 +32,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) -- 2.39.2