diff --git a/GUI/Model/Material/MaterialItem.cpp b/GUI/Model/Material/MaterialItem.cpp index ecd88d82bb6f1e1c133404c7a18d88fc86a0fb9e..32947f389d0c37abad382e6e02ebde120a13b5e2 100644 --- a/GUI/Model/Material/MaterialItem.cpp +++ b/GUI/Model/Material/MaterialItem.cpp @@ -54,7 +54,8 @@ MaterialItem::MaterialItem() : m_data(Refractive(0.0, 0.0)) } MaterialItem::MaterialItem(const MaterialItem& other) - : m_name(other.m_name) + : QObject() + , m_name(other.m_name) , m_id(other.m_id) , m_color(other.m_color) , m_data(other.m_data) diff --git a/GUI/Model/Material/MaterialItem.h b/GUI/Model/Material/MaterialItem.h index 106cf4b2cb712683ea590d0ff359e78d33997747..bd68c9622d1c176b6b6280e0dc22eec88847351d 100644 --- a/GUI/Model/Material/MaterialItem.h +++ b/GUI/Model/Material/MaterialItem.h @@ -35,6 +35,11 @@ public: MaterialItem(); //! Creates a complete copy, also the identifier is the same. + //! + //! Note that the base QObject is freshly initialized, not copied from \a other. Therefore + //! object hierarchy, connections, properties, object name or similar things are not copied. + //! This is of no harm since this class is only derived from QObject to provide data change + //! signaling. MaterialItem(const MaterialItem& other); //! Turns material into refractive index material.