Fix in Drawing page object - fixes #1540
* Changing the editable texts updates the page automatically * Added a doc.recompute() after creating a new page
This commit is contained in:
parent
e0bdc07c4d
commit
dc3ebfb502
|
@ -76,8 +76,12 @@ void FeaturePage::onChanged(const App::Property* prop)
|
|||
if (!fi.exists())
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (prop == &Template) {
|
||||
} else if (prop == &EditableTexts) {
|
||||
if (!this->isRestoring()) {
|
||||
this->execute();
|
||||
return;
|
||||
}
|
||||
} else if (prop == &Template) {
|
||||
if (!this->isRestoring()) {
|
||||
EditableTexts.setValues(getEditableTextsFromTemplate());
|
||||
}
|
||||
|
|
|
@ -104,6 +104,7 @@ void CmdDrawingNewPage::activated(int iMsg)
|
|||
openCommand("Drawing create page");
|
||||
doCommand(Doc,"App.activeDocument().addObject('Drawing::FeaturePage','%s')",FeatName.c_str());
|
||||
doCommand(Doc,"App.activeDocument().%s.Template = '%s'",FeatName.c_str(), (const char*)tfi.filePath().toUtf8());
|
||||
doCommand(Doc,"App.activeDocument().recompute()");
|
||||
commitCommand();
|
||||
}
|
||||
else {
|
||||
|
@ -231,6 +232,7 @@ void CmdDrawingNewA3Landscape::activated(int iMsg)
|
|||
openCommand("Drawing create page");
|
||||
doCommand(Doc,"App.activeDocument().addObject('Drawing::FeaturePage','%s')",FeatName.c_str());
|
||||
doCommand(Doc,"App.activeDocument().%s.Template = 'A3_Landscape.svg'",FeatName.c_str());
|
||||
doCommand(Doc,"App.activeDocument().recompute()");
|
||||
commitCommand();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user