From 27736eaeef37d48b5d0094e77b1abdcedb400dd4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me?= Date: Thu, 17 Dec 2020 15:32:02 +0100 Subject: [PATCH] #20529 : Add GeomValidators_ConstructionComposite in xml --- .../FeaturesPlugin_PointCoordinates.cpp | 16 ++++++---------- src/FeaturesPlugin/point_coordinates_widget.xml | 1 + 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/FeaturesPlugin/FeaturesPlugin_PointCoordinates.cpp b/src/FeaturesPlugin/FeaturesPlugin_PointCoordinates.cpp index 01b8199a0..6a6daa9c5 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_PointCoordinates.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_PointCoordinates.cpp @@ -79,16 +79,12 @@ void FeaturesPlugin_PointCoordinates::attributeChanged(const std::string& theID) } if (aShape) { aPoint = GeomAlgoAPI_PointBuilder::point(aShape); - if (aPoint.get()) { - streamx << std::setprecision(14) << aPoint->x(); - aValues->setValue(0, aPoint->x()); - streamy << std::setprecision(14) << aPoint->y(); - aValues->setValue(1, aPoint->y()); - streamz << std::setprecision(14) << aPoint->z(); - aValues->setValue(2, aPoint->z()); - } else { - aSelection->setValue( aSelection->context(),GeomShapePtr()); - } + streamx << std::setprecision(14) << aPoint->x(); + aValues->setValue(0, aPoint->x()); + streamy << std::setprecision(14) << aPoint->y(); + aValues->setValue(1, aPoint->y()); + streamz << std::setprecision(14) << aPoint->z(); + aValues->setValue(2, aPoint->z()); } string(X_COORD_ID() )->setValue( "X = " + streamx.str() ); diff --git a/src/FeaturesPlugin/point_coordinates_widget.xml b/src/FeaturesPlugin/point_coordinates_widget.xml index 7e5aa1151..29c744cc9 100644 --- a/src/FeaturesPlugin/point_coordinates_widget.xml +++ b/src/FeaturesPlugin/point_coordinates_widget.xml @@ -5,6 +5,7 @@ tooltip="Select a point" shape_types="vertex" default=""> +