[TD]add preference methods for center marks
This commit is contained in:
committed by
Chris Hennes
parent
f218c5f25c
commit
23290b8050
@@ -709,3 +709,13 @@ double Preferences::detailSnapRadius()
|
||||
return getPreferenceGroup("General")->GetFloat("DetailSnapRadius", 0.6);
|
||||
}
|
||||
|
||||
|
||||
bool Preferences::showCenterMarks()
|
||||
{
|
||||
return getPreferenceGroup("Decorations")->GetBool("ShowCenterMarks", false);
|
||||
}
|
||||
|
||||
bool Preferences::printCenterMarks()
|
||||
{
|
||||
return getPreferenceGroup("Decorations")->GetBool("PrintCenterMarks", false);
|
||||
}
|
||||
|
||||
@@ -166,6 +166,9 @@ public:
|
||||
static bool snapDetailHighlights();
|
||||
static double detailSnapRadius();
|
||||
|
||||
static bool showCenterMarks();
|
||||
static bool printCenterMarks();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@ void PagePrinter::printAllPdf(QPrinter* printer, App::Document* doc)
|
||||
renderPage(vpp, painter, sourceRect, targetRect);
|
||||
dPage->redrawCommand();
|
||||
|
||||
ourScene->setExportingPdf(true);
|
||||
ourScene->setExportingPdf(false);
|
||||
}
|
||||
|
||||
ourDoc->setModified(docModifiedState);
|
||||
|
||||
@@ -102,12 +102,11 @@ ViewProviderViewPart::ViewProviderViewPart()
|
||||
ADD_PROPERTY_TYPE(ExtraWidth, (weight), group, App::Prop_None, "The thickness of LineGroup Extra lines, if enabled");
|
||||
|
||||
double defScale = Preferences::getPreferenceGroup("Decorations")->GetFloat("CenterMarkScale", 0.50);
|
||||
bool defShowCenters = Preferences::getPreferenceGroup("Decorations")->GetBool("ShowCenterMarks", false);
|
||||
|
||||
//decorations
|
||||
ADD_PROPERTY_TYPE(HorizCenterLine ,(false), dgroup, App::Prop_None, "Show a horizontal centerline through view");
|
||||
ADD_PROPERTY_TYPE(VertCenterLine ,(false), dgroup, App::Prop_None, "Show a vertical centerline through view");
|
||||
ADD_PROPERTY_TYPE(ArcCenterMarks ,(defShowCenters), dgroup, App::Prop_None, "Center marks on/off");
|
||||
ADD_PROPERTY_TYPE(ArcCenterMarks ,(Preferences::showCenterMarks()), dgroup, App::Prop_None, "Center marks on/off");
|
||||
ADD_PROPERTY_TYPE(CenterScale, (defScale), dgroup, App::Prop_None, "Center mark size adjustment, if enabled");
|
||||
|
||||
//properties that affect Section Line
|
||||
|
||||
Reference in New Issue
Block a user