Skip to content

Commit

Permalink
[TD]prevent touched but must be execute on DrawPage
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererFan authored and donovaly committed Jan 3, 2022
1 parent a73f442 commit bca9684
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mod/TechDraw/App/DrawPage.cpp
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions src/Mod/TechDraw/Gui/Command.cpp
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit bca9684

Please sign in to comment.