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:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user