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:
@@ -66,9 +66,9 @@ DrawViewAnnotation::DrawViewAnnotation(void)
|
||||
ADD_PROPERTY_TYPE(Font ,(fontName.c_str()),vgroup,App::Prop_None, "The name of the font to use");
|
||||
ADD_PROPERTY_TYPE(TextColor,(0.0f,0.0f,0.0f),vgroup,App::Prop_None,"The color of the text");
|
||||
|
||||
ADD_PROPERTY_TYPE(TextSize,(8),vgroup,App::Prop_None,"The size of the text in mm");
|
||||
ADD_PROPERTY_TYPE(TextSize,(8.0),vgroup,App::Prop_None,"The size of the text in units");
|
||||
ADD_PROPERTY_TYPE(MaxWidth,(-1.0),vgroup,App::Prop_None,"The maximum width of the Annotation block");
|
||||
ADD_PROPERTY_TYPE(LineSpace,(80),vgroup,App::Prop_None,"Line spacing adjustment");
|
||||
ADD_PROPERTY_TYPE(LineSpace,(80),vgroup,App::Prop_None,"Line spacing adjustment. 100 is normal spacing.");
|
||||
|
||||
TextStyle.setEnums(TextStyleEnums);
|
||||
ADD_PROPERTY(TextStyle, ((long)0));
|
||||
@@ -120,7 +120,7 @@ QRectF DrawViewAnnotation::getRect() const
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn *DrawViewAnnotation::execute(void)
|
||||
{
|
||||
{
|
||||
requestPaint();
|
||||
return TechDraw::DrawView::execute();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <App/DocumentObject.h>
|
||||
#include <App/PropertyLinks.h>
|
||||
#include <App/PropertyStandard.h>
|
||||
#include <App/PropertyUnits.h>
|
||||
#include <App/FeaturePython.h>
|
||||
|
||||
#include "DrawView.h"
|
||||
@@ -50,7 +51,7 @@ public:
|
||||
App::PropertyStringList Text;
|
||||
App::PropertyFont Font;
|
||||
App::PropertyColor TextColor;
|
||||
App::PropertyInteger TextSize;
|
||||
App::PropertyLength TextSize;
|
||||
App::PropertyInteger LineSpace;
|
||||
App::PropertyEnumeration TextStyle; // Plain,Bold,Italic,Bold-Italic
|
||||
App::PropertyFloat MaxWidth;
|
||||
|
||||
Reference in New Issue
Block a user