Measure: Fix TaskMeasure

Made several fixes to TaskMeasure:
* Move to correct namespace
* Handle possible exception in update() method
* Add null pointer checks for buttonBox
* Cannot use 'Measure::MeasurePython' as template argument in addObject<>
  because the macro PROPERTY_HEADER_WITH_OVERRIDE determines the invalid
  string 'App::FeaturePythonT<FeatureT>' so that an exception is raised

Note: The changes might fix issue 20304
This commit is contained in:
wmayer
2025-03-21 15:00:12 +01:00
committed by Ladislav Michl
parent 14de080897
commit d1a84ab538
4 changed files with 32 additions and 17 deletions

View File

@@ -3065,7 +3065,7 @@ DocumentObject* Document::addObject(const char* sType,
Base::Type::getTypeIfDerivedFrom(sType, DocumentObject::getClassTypeId(), true);
if (type.isBad()) {
std::stringstream str;
str << "'" << sType << "' is not a document object type";
str << "Document::addObject: '" << sType << "' is not a document object type";
throw Base::TypeError(str.str());
}