Fix propagation of Source property to children
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -165,6 +165,7 @@ protected:
|
||||
/// Returns pointer to our page, or NULL if it couldn't be located
|
||||
TechDraw::DrawPage * getPage(void) const;
|
||||
void updateChildren(void);
|
||||
void updateChildrenSource(void);
|
||||
void setPropsFromCube(void);
|
||||
void setCubeFromProps(void);
|
||||
int getViewIndex(const char *viewTypeCStr) const;
|
||||
|
||||
Reference in New Issue
Block a user