[TD]Centralize preference getters

This commit is contained in:
wandererfan
2020-04-12 20:44:08 -04:00
committed by WandererFan
parent a6cfe5c47f
commit a3029fec74
61 changed files with 881 additions and 501 deletions

View File

@@ -63,6 +63,7 @@
#include <Mod/TechDraw/App/DrawWeldSymbol.h>
#include <Mod/TechDraw/App/DrawUtil.h>
#include "PreferencesGui.h"
#include "MDIViewPage.h"
#include "QGVPage.h"
#include "QGITemplate.h"
@@ -71,6 +72,7 @@
using namespace TechDrawGui;
using namespace TechDraw;
#define _SHOWDRAWING 10
#define _TOGGLEUPDATE 11
@@ -406,10 +408,7 @@ void ViewProviderPage::finishRestoring()
m_docReady = true;
//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) {
if (Preferences::keepPagesUpToDate()) {
static_cast<void>(showMDIViewPage());
}
Gui::ViewProviderDocumentObject::finishRestoring();