DrawViewSymbol forgets Scale on restore
This commit is contained in:
@@ -70,7 +70,7 @@ DrawView::DrawView(void)
|
||||
ScaleType.setEnums(ScaleTypeEnums);
|
||||
ADD_PROPERTY_TYPE(ScaleType,((long)0),group, App::Prop_None, "Scale Type");
|
||||
ADD_PROPERTY_TYPE(Scale ,(1.0),group,App::Prop_None,"Scale factor of the view");
|
||||
Scale.setStatus(App::Property::ReadOnly,true);
|
||||
//Scale.setStatus(App::Property::ReadOnly,true);
|
||||
|
||||
autoPos = true;
|
||||
|
||||
@@ -119,14 +119,15 @@ void DrawView::onChanged(const App::Property* prop)
|
||||
TechDraw::DrawPage *page = findParentPage();
|
||||
if(page) {
|
||||
if(std::abs(page->Scale.getValue() - Scale.getValue()) > FLT_EPSILON) {
|
||||
Scale.setValue(page->Scale.getValue()); // Recalculate scale from page
|
||||
Scale.setValue(page->Scale.getValue()); // Reset scale from page
|
||||
Scale.touch();
|
||||
}
|
||||
}
|
||||
Scale.setStatus(App::Property::ReadOnly,true);
|
||||
App::GetApplication().signalChangePropertyEditor(Scale);
|
||||
} else if (ScaleType.isValue("Custom") &&
|
||||
Scale.testStatus(App::Property::ReadOnly)) {
|
||||
} else if ( ScaleType.isValue("Custom") ) {
|
||||
// } else if (ScaleType.isValue("Custom") &&
|
||||
// Scale.testStatus(App::Property::ReadOnly)) {
|
||||
Scale.setStatus(App::Property::ReadOnly,false);
|
||||
App::GetApplication().signalChangePropertyEditor(Scale);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user