[TD]prevent touched but must be execute on DrawPage

This commit is contained in:
Wanderer Fan
2021-12-23 15:29:04 -05:00
committed by WandererFan
parent 5ade10d049
commit 74dc5344d4
2 changed files with 3 additions and 1 deletions

View File

@@ -162,7 +162,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.

View File

@@ -141,6 +141,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) {
@@ -220,6 +221,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) {