[TD]prevent touched but must be execute on DrawPage

This commit is contained in:
Wanderer Fan
2022-01-03 23:09:34 +01:00
committed by Uwe
parent a73f442f88
commit bca9684ec3
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -163,7 +163,7 @@ void DrawPage::onChanged(const App::Property* prop)
//Page is just a container. It doesn't "do" anything.
App::DocumentObjectExecReturn *DrawPage::execute(void)
{
return App::DocumentObject::StdReturn;
return App::DocumentObject::execute();
}
// this is now irrelevant, b/c DP::execute doesn't do anything.
+2
View File
@@ -136,6 +136,7 @@ void CmdTechDrawPageDefault::activated(int iMsg)
doCommand(Doc,"App.activeDocument().%s.Template = '%s'",TemplateName.c_str(), templateFileName.toStdString().c_str());
doCommand(Doc,"App.activeDocument().%s.Template = App.activeDocument().%s",PageName.c_str(),TemplateName.c_str());
updateActive();
commitCommand();
TechDraw::DrawPage* fp = dynamic_cast<TechDraw::DrawPage*>(getDocument()->getObject(PageName.c_str()));
if (!fp) {
@@ -215,6 +216,7 @@ void CmdTechDrawPageTemplate::activated(int iMsg)
doCommand(Doc,"App.activeDocument().%s.Template = App.activeDocument().%s",PageName.c_str(),TemplateName.c_str());
// consider renaming DrawSVGTemplate.Template property?
updateActive();
commitCommand();
TechDraw::DrawPage* fp = dynamic_cast<TechDraw::DrawPage*>(getDocument()->getObject(PageName.c_str()));
if (!fp) {