[TD]add separate property for geom hatch
This commit is contained in:
@@ -46,6 +46,9 @@
|
||||
#include <Gui/ViewProvider.h>
|
||||
#include <Gui/WaitCursor.h>
|
||||
|
||||
#include <Mod/TechDraw/App/DrawHatch.h>
|
||||
#include <Mod/TechDraw/App/DrawGeomHatch.h>
|
||||
|
||||
#include "TaskSectionView.h"
|
||||
|
||||
#include "ViewProviderViewSection.h"
|
||||
@@ -67,7 +70,12 @@ ViewProviderViewSection::ViewProviderViewSection()
|
||||
ADD_PROPERTY_TYPE(CutSurfaceColor,(0.0,0.0,0.0),sgroup,App::Prop_None,"The color to shade the cut surface");
|
||||
//HatchCutSurface is obsolete - use CutSurfaceDisplay
|
||||
ADD_PROPERTY_TYPE(HatchCutSurface ,(false),hgroup,App::Prop_Hidden,"Hatch the cut surface");
|
||||
ADD_PROPERTY_TYPE(HatchColor,(0.0,0.0,0.0),hgroup,App::Prop_None,"The color of the hatch pattern");
|
||||
|
||||
ADD_PROPERTY_TYPE(HatchColor,(TechDraw::DrawHatch::prefSvgHatchColor()),
|
||||
hgroup,App::Prop_None,"The color of the Svg hatch pattern");
|
||||
ADD_PROPERTY_TYPE(GeomHatchColor,(TechDraw::DrawGeomHatch::prefGeomHatchColor()),
|
||||
hgroup,App::Prop_None,"The color of the Geometric hatch pattern");
|
||||
|
||||
ADD_PROPERTY_TYPE(WeightPattern,(0.1),hgroup,App::Prop_None,"GeomHatch pattern line thickness");
|
||||
|
||||
getParameters();
|
||||
@@ -103,6 +111,7 @@ void ViewProviderViewSection::onChanged(const App::Property* prop)
|
||||
if (prop == &WeightPattern ||
|
||||
// prop == &HatchCutSurface ||
|
||||
prop == &HatchColor ||
|
||||
prop == &GeomHatchColor ||
|
||||
// prop == &ShowCutSurface ||
|
||||
prop == &CutSurfaceColor ) {
|
||||
updateGraphic();
|
||||
@@ -178,8 +187,9 @@ void ViewProviderViewSection::getParameters(void)
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Colors");
|
||||
App::Color cutColor = App::Color((uint32_t) hGrp->GetUnsigned("CutSurfaceColor", 0xC8C8C800));
|
||||
CutSurfaceColor.setValue(cutColor);
|
||||
App::Color hatchColor = App::Color((uint32_t) hGrp->GetUnsigned("SectionHatchColor", 0x00000000));
|
||||
HatchColor.setValue(hatchColor);
|
||||
|
||||
// App::Color hatchColor = App::Color((uint32_t) hGrp->GetUnsigned("SectionHatchColor", 0x00000000));
|
||||
// HatchColor.setValue(hatchColor);
|
||||
|
||||
hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/PAT");
|
||||
|
||||
Reference in New Issue
Block a user