Fem: Move Points and Normals properties to base class
This commit is contained in:
committed by
Chris Hennes
parent
a489b095f0
commit
c49c52716c
@@ -58,20 +58,6 @@ ConstraintContact::ConstraintContact()
|
||||
"ConstraintContact",
|
||||
App::PropertyType(App::Prop_None),
|
||||
"Stick slope");
|
||||
|
||||
ADD_PROPERTY_TYPE(Points,
|
||||
(Base::Vector3d()),
|
||||
"ConstraintContact",
|
||||
App::PropertyType(App::Prop_ReadOnly | App::Prop_Output),
|
||||
"Points where symbols are drawn");
|
||||
ADD_PROPERTY_TYPE(Normals,
|
||||
(Base::Vector3d()),
|
||||
"ConstraintContact",
|
||||
App::PropertyType(App::Prop_ReadOnly | App::Prop_Output),
|
||||
"Normals where symbols are drawn");
|
||||
/* */
|
||||
Points.setValues(std::vector<Base::Vector3d>());
|
||||
Normals.setValues(std::vector<Base::Vector3d>());
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn* ConstraintContact::execute()
|
||||
@@ -87,18 +73,6 @@ const char* ConstraintContact::getViewProviderName() const
|
||||
void ConstraintContact::onChanged(const App::Property* prop)
|
||||
{
|
||||
Constraint::onChanged(prop);
|
||||
|
||||
if (prop == &References) {
|
||||
std::vector<Base::Vector3d> points;
|
||||
std::vector<Base::Vector3d> normals;
|
||||
int scale = 1; // OvG: Enforce use of scale
|
||||
if (getPoints(points, normals, &scale)) {
|
||||
Points.setValues(points);
|
||||
Normals.setValues(normals);
|
||||
Scale.setValue(scale); // OvG: Scale
|
||||
Points.touch(); // This triggers ViewProvider::updateData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ConstraintContact::handleChangedPropertyType(Base::XMLReader& reader,
|
||||
|
||||
Reference in New Issue
Block a user