Currently when ScaleType is changed, Scale retains it's read-only attribute until I unselect the object and reselect it. I've tried various "execute" and "touch" methods but I'm missing something.
Any suggestions?
wf
Code: Select all
App::DocumentObjectExecReturn *FeatureView::execute(void)
{
if(strcmp(ScaleType.getValueAsString(), "Document") == 0) {
Scale.StatusBits.set(2, true);
Drawing::FeaturePage *page = findParentPage();
if(page) {
if(std::abs(page->Scale.getValue() - Scale.getValue()) > FLT_EPSILON) {
Scale.setValue(page->Scale.getValue()); // Recalculate scale from page
Scale.touch();
}
}
} else if(strcmp(ScaleType.getValueAsString(), "Custom") == 0) {
Scale.StatusBits.set(2, false);
// something needs to happen here to update PropertyEditor?
}
return App::DocumentObject::execute();
}