reduce use of "execute" on cosmetic changes.

This commit is contained in:
WandererFan
2016-09-10 12:41:25 -04:00
parent 6dc017a1ce
commit 4d7f00860e
28 changed files with 188 additions and 144 deletions

View File

@@ -107,7 +107,6 @@ void DrawPage::onChanged(const App::Property* prop)
} else if (prop == &Views) {
if (!isRestoring()) {
//TODO: reload if Views prop changes (ie adds/deletes)
//touch();
}
} else if(prop == &Scale) {
// touch all views in the Page as they may be dependent on this scale
@@ -136,6 +135,8 @@ void DrawPage::onChanged(const App::Property* prop)
App::DocumentObjectExecReturn *DrawPage::execute(void)
{
//Page is just a property storage area? no real logic involved?
//all this does is trigger onChanged in this and ViewProviderPage
Template.touch();
Views.touch();
return App::DocumentObject::StdReturn;

View File

@@ -129,7 +129,6 @@ short DrawView::mustExecute() const
if (!isRestoring()) {
result = (X.isTouched() ||
Y.isTouched() ||
Rotation.isTouched() ||
Scale.isTouched() ||
ScaleType.isTouched() );
}

View File

@@ -76,8 +76,7 @@ void DrawViewClip::onChanged(const App::Property* prop)
{
if (prop == &Height ||
prop == &Width ||
prop == &ShowFrame ||
prop == &ShowLabels) {
prop == &Views) {
if (!isRestoring()) {
DrawViewClip::execute();
}

View File

@@ -225,22 +225,10 @@ short DrawViewPart::mustExecute() const
Source.isTouched() ||
Scale.isTouched() ||
ScaleType.isTouched() ||
Tolerance.isTouched());
// don't have to execute DVP, but should update Gui
// ShowHiddenLines.isTouched() ||
// ShowSmoothLines.isTouched() ||
// ShowSeamLines.isTouched() ||
// LineWidth.isTouched() ||
// HiddenWidth.isTouched() ||
// ShowCenters.isTouched() ||
// CenterScale.isTouched() ||
// ShowSectionLine.isTouched() ||
// HorizSectionLine.isTouched() ||
// ArrowUpSection.isTouched() ||
// SymbolSection.isTouched() ||
// HorizCenterLine.isTouched() ||
// VertCenterLine.isTouched());
Tolerance.isTouched() ||
ShowHiddenLines.isTouched() ||
ShowSmoothLines.isTouched() ||
ShowSeamLines.isTouched() );
}
if (result) {
@@ -259,28 +247,16 @@ void DrawViewPart::onChanged(const App::Property* prop)
prop == &XAxisDirection ||
prop == &Source ||
prop == &Scale ||
prop == &ScaleType) {
//don't need to execute, but need to update Gui
// prop == &ShowHiddenLines ||
// prop == &ShowSmoothLines ||
// prop == &ShowSeamLines ||
// prop == &LineWidth ||
// prop == &HiddenWidth ||
// prop == &ShowCenters ||
// prop == &CenterScale ||
// prop == &ShowSectionLine ||
// prop == &HorizSectionLine ||
// prop == &ArrowUpSection ||
// prop == &SymbolSection ||
// prop == &HorizCenterLine ||
// prop == &VertCenterLine) {
prop == &ScaleType ||
prop == &ShowHiddenLines ||
prop == &ShowSmoothLines ||
prop == &ShowSeamLines)
try {
App::DocumentObjectExecReturn *ret = recompute();
delete ret;
}
catch (...) {
}
}
}
DrawView::onChanged(prop);

View File

@@ -115,10 +115,6 @@ short DrawViewSection::mustExecute() const
BaseView.isTouched() ||
SectionNormal.isTouched() ||
SectionOrigin.isTouched() );
//don't need to execute, but need to update Gui
// ShowCutSurface.isTouched() ||
// CutSurfaceColor.isTouched() );
}
if (result) {
return result;