diff --git a/src/App/PropertyStandard.cpp b/src/App/PropertyStandard.cpp index 6e99f4e782..b7695b8163 100644 --- a/src/App/PropertyStandard.cpp +++ b/src/App/PropertyStandard.cpp @@ -2651,6 +2651,18 @@ PropertyMaterialList::~PropertyMaterialList() = default; //************************************************************************** // Base class implementer +void PropertyMaterialList::setValues(const std::vector& newValues) +{ + if (!newValues.empty()) { + PropertyListsT::setValues(newValues); + } + else { + aboutToSetValue(); + setSize(1); + hasSetValue(); + } +} + PyObject* PropertyMaterialList::getPyObject() { Py::Tuple tuple(getSize()); diff --git a/src/App/PropertyStandard.h b/src/App/PropertyStandard.h index d013400a33..4c2161a30f 100644 --- a/src/App/PropertyStandard.h +++ b/src/App/PropertyStandard.h @@ -1118,6 +1118,7 @@ public: { PropertyListsT::setValue(materials); } + void setValues(const std::vector& newValues = std::vector()) override; void setValue(const Material& mat); void setValue(int index, const Material& mat);