Fix DrawViewAnnotation TextSize

- text size was originally specified in integer
  point size.  Now they are specified in mm. The
  relevant Properties have been changed to
  PropertyLength.
This commit is contained in:
WandererFan
2018-02-21 08:20:04 -05:00
committed by wmayer
parent 143b89c8f3
commit 946cce2fc1
4 changed files with 12 additions and 9 deletions

View File

@@ -62,7 +62,7 @@ ViewProviderDimension::ViewProviderDimension()
double fontSize = hGrp->GetFloat("FontSize", 3.5);
ADD_PROPERTY_TYPE(Font ,(fontName.c_str()),group,App::Prop_None, "The name of the font to use");
ADD_PROPERTY_TYPE(Fontsize,(fontSize) ,group,(App::PropertyType)(App::Prop_None),"Dimension text size in mm");
ADD_PROPERTY_TYPE(Fontsize,(fontSize) ,group,(App::PropertyType)(App::Prop_None),"Dimension text size in units");
hGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
std::string lgName = hGrp->GetASCII("LineGroup","FC 0.70mm");

View File

@@ -25,6 +25,8 @@
#ifndef DRAWINGGUI_VIEWPROVIDERDIMENSION_H
#define DRAWINGGUI_VIEWPROVIDERDIMENSION_H
#include <App/PropertyUnits.h>
#include "ViewProviderDrawingView.h"
#include <Mod/TechDraw/App/DrawViewDimension.h>
@@ -42,10 +44,10 @@ public:
/// destructor
virtual ~ViewProviderDimension();
App::PropertyFont Font;
App::PropertyFloat Fontsize;
App::PropertyFloat LineWidth;
App::PropertyColor Color;
App::PropertyFont Font;
App::PropertyLength Fontsize;
App::PropertyFloat LineWidth;
App::PropertyColor Color;
virtual void attach(App::DocumentObject *);