[TD]Centralize preference getters
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
#include <Mod/TechDraw/Gui/ui_TaskCenterLine.h>
|
||||
|
||||
#include "DrawGuiStd.h"
|
||||
#include "PreferencesGui.h"
|
||||
#include "QGVPage.h"
|
||||
#include "QGIView.h"
|
||||
#include "QGIPrimPath.h"
|
||||
@@ -419,9 +420,7 @@ void TaskCenterLine::enableTaskButtons(bool b)
|
||||
|
||||
double TaskCenterLine::getCenterWidth()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp")->
|
||||
GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
|
||||
std::string lgName = hGrp->GetASCII("LineGroup","FC 0.70mm");
|
||||
std::string lgName = Preferences::lineGroup();
|
||||
auto lg = TechDraw::LineGroup::lineGroupFactory(lgName);
|
||||
|
||||
double width = lg->getWeight("Graphic");
|
||||
@@ -444,10 +443,7 @@ Qt::PenStyle TaskCenterLine::getCenterStyle()
|
||||
|
||||
QColor TaskCenterLine::getCenterColor()
|
||||
{
|
||||
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
|
||||
App::Color fcColor = App::Color((uint32_t) hGrp->GetUnsigned("CenterColor", 0x00000000));
|
||||
return fcColor.asValue<QColor>();
|
||||
return PreferencesGui::centerQColor();
|
||||
}
|
||||
|
||||
double TaskCenterLine::getExtendBy(void)
|
||||
|
||||
Reference in New Issue
Block a user