Fix propagation of Source property to children

This commit is contained in:
wandererfan
2018-08-14 22:12:36 -04:00
committed by wmayer
parent cb90ce96de
commit 38759a5b1b
2 changed files with 22 additions and 0 deletions

View File

@@ -116,6 +116,9 @@ void DrawProjGroup::onChanged(const App::Property* prop)
if (prop == &Scale) {
updateChildren();
}
if (prop == &Source) {
updateChildrenSource();
}
if (prop == &ScaleType) {
double newScale = getScale();
@@ -723,6 +726,24 @@ void DrawProjGroup::updateChildren(void)
}
}
//void DrawProjGroup::updateChildren(const App::Property* prop)
//{
// view->....setValue(s)(prop->getValue(s));
//}
/*!
* tell children DPGIs that parent DPG has changed Source
*/
void DrawProjGroup::updateChildrenSource(void)
{
for( const auto it : Views.getValues() ) {
auto view( dynamic_cast<DrawProjGroupItem *>(it) );
if( view ) {
view->Source.setValues(Source.getValues());
}
}
}
/*!
* check if ProjectionGroup fits on Page
*/