From: Jérôme Date: Thu, 17 Dec 2020 13:06:34 +0000 (+0100) Subject: #20529 : fix issue X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8aafaf00ad0b116557b752f1daa958500f3a1779;p=modules%2Fshaper.git #20529 : fix issue --- diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index f5d069e51..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "restructuredtext.confPath": "", - "files.associations": { - "array": "cpp", - "atomic": "cpp", - "*.tcc": "cpp", - "bitset": "cpp", - "cctype": "cpp", - "chrono": "cpp", - "clocale": "cpp", - "cmath": "cpp", - "cstdarg": "cpp", - "cstddef": "cpp", - "cstdint": "cpp", - "cstdio": "cpp", - "cstdlib": "cpp", - "cstring": "cpp", - "ctime": "cpp", - "cwchar": "cpp", - "cwctype": "cpp", - "deque": "cpp", - "list": "cpp", - "unordered_map": "cpp", - "vector": "cpp", - "exception": "cpp", - "algorithm": "cpp", - "functional": "cpp", - "iterator": "cpp", - "map": "cpp", - "memory": "cpp", - "memory_resource": "cpp", - "numeric": "cpp", - "optional": "cpp", - "ratio": "cpp", - "regex": "cpp", - "set": "cpp", - "string": "cpp", - "string_view": "cpp", - "system_error": "cpp", - "tuple": "cpp", - "type_traits": "cpp", - "utility": "cpp", - "fstream": "cpp", - "initializer_list": "cpp", - "iomanip": "cpp", - "iosfwd": "cpp", - "iostream": "cpp", - "istream": "cpp", - "limits": "cpp", - "new": "cpp", - "ostream": "cpp", - "sstream": "cpp", - "stdexcept": "cpp", - "streambuf": "cpp", - "cinttypes": "cpp", - "typeinfo": "cpp" - } -} \ No newline at end of file diff --git a/src/FeaturesPlugin/FeaturesPlugin_PointCoordinates.cpp b/src/FeaturesPlugin/FeaturesPlugin_PointCoordinates.cpp index 6a6daa9c5..01b8199a0 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_PointCoordinates.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_PointCoordinates.cpp @@ -79,12 +79,16 @@ void FeaturesPlugin_PointCoordinates::attributeChanged(const std::string& theID) } if (aShape) { aPoint = GeomAlgoAPI_PointBuilder::point(aShape); - 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()); + 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()); + } } string(X_COORD_ID() )->setValue( "X = " + streamx.str() );