separate display properties from properties
This commit is contained in:
@@ -284,6 +284,21 @@ public:
|
||||
void save_override(const boost::archive::class_name_type &t) {}
|
||||
void save_override(const boost::archive::tracking_type &t) {}
|
||||
|
||||
// Called by Property<T>::serialize() and EnumProperty::serialize() to
|
||||
// directly register an existing property object as a display property.
|
||||
void register_property(uLib::PropertyBase &p) {
|
||||
if (m_Puppet) {
|
||||
m_Puppet->RegisterDisplayProperty(&p);
|
||||
Vtk::Puppet *puppet = m_Puppet;
|
||||
uLib::Object::connect(&p, &uLib::PropertyBase::Updated,
|
||||
[puppet]() { puppet->Update(); });
|
||||
}
|
||||
}
|
||||
|
||||
void register_enum_property(uLib::EnumProperty &p) {
|
||||
register_property(p);
|
||||
}
|
||||
|
||||
private:
|
||||
Vtk::Puppet *m_Puppet;
|
||||
std::vector<std::string> m_GroupStack;
|
||||
|
||||
Reference in New Issue
Block a user