reduce use of "execute" on cosmetic changes.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -129,7 +129,6 @@ short DrawView::mustExecute() const
|
||||
if (!isRestoring()) {
|
||||
result = (X.isTouched() ||
|
||||
Y.isTouched() ||
|
||||
Rotation.isTouched() ||
|
||||
Scale.isTouched() ||
|
||||
ScaleType.isTouched() );
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user