Fix #2967 Ph2 Do not show page on restore.

- phase 1 of this fix displayed an empty Page when
  restoring with Preference set to "Do Not Keep Pages
  Up To Date".  Ph2 does not show the Page at all.
This commit is contained in:
WandererFan
2017-11-21 19:52:37 -05:00
parent 2cd338ba03
commit 56f07de8ad

View File

@@ -346,7 +346,14 @@ void ViewProviderPage::startRestoring()
void ViewProviderPage::finishRestoring()
{
m_docReady = true;
static_cast<void>(showMDIViewPage());
//control drawing opening on restore based on Preference
//mantis #2967 ph2 - don't even show blank page
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/General");
bool autoUpdate = hGrp->GetBool("KeepPagesUpToDate", 1l);
if (autoUpdate) {
static_cast<void>(showMDIViewPage());
}
Gui::ViewProviderDocumentObject::finishRestoring();
}