typo in property name
This commit is contained in:
parent
699c066991
commit
2628550860
|
@ -48,7 +48,7 @@ using namespace std;
|
|||
|
||||
PROPERTY_SOURCE(TechDraw::DrawViewAnnotation, TechDraw::DrawView)
|
||||
|
||||
const char* DrawViewAnnotation::TextFormatEnums[]= {"Normal",
|
||||
const char* DrawViewAnnotation::TextStyleEnums[]= {"Normal",
|
||||
"Bold",
|
||||
"Italic",
|
||||
"Bold-Italic",
|
||||
|
@ -70,8 +70,8 @@ DrawViewAnnotation::DrawViewAnnotation(void)
|
|||
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");
|
||||
|
||||
TextFormat.setEnums(TextFormatEnums);
|
||||
ADD_PROPERTY(TextFormat, ((long)0));
|
||||
TextStyle.setEnums(TextStyleEnums);
|
||||
ADD_PROPERTY(TextStyle, ((long)0));
|
||||
|
||||
//Scale.StatusBits.set(3); //hide scale. n/a for Annotation
|
||||
//ScaleType.StatusBits.set(3);
|
||||
|
@ -91,7 +91,7 @@ void DrawViewAnnotation::onChanged(const App::Property* prop)
|
|||
prop == &TextColor ||
|
||||
prop == &TextSize ||
|
||||
prop == &LineSpace ||
|
||||
prop == &TextFormat || //changing this doesn't recompute until focus changes??
|
||||
prop == &TextStyle || //changing this doesn't recompute until focus changes??
|
||||
prop == &MaxWidth) {
|
||||
try {
|
||||
App::DocumentObjectExecReturn *ret = recompute();
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
App::PropertyColor TextColor;
|
||||
App::PropertyInteger TextSize;
|
||||
App::PropertyInteger LineSpace;
|
||||
App::PropertyEnumeration TextFormat; // Plain,Bold,Italic,Bold-Italic
|
||||
App::PropertyEnumeration TextStyle; // Plain,Bold,Italic,Bold-Italic
|
||||
App::PropertyFloat MaxWidth;
|
||||
|
||||
/** @name methods overide Feature */
|
||||
|
@ -73,7 +73,7 @@ protected:
|
|||
virtual void onChanged(const App::Property* prop);
|
||||
|
||||
private:
|
||||
static const char* TextFormatEnums[];
|
||||
static const char* TextStyleEnums[];
|
||||
};
|
||||
|
||||
typedef App::FeaturePythonT<DrawViewAnnotation> DrawViewAnnotationPython;
|
||||
|
|
|
@ -132,16 +132,16 @@ void QGIViewAnnotation::drawAnnotation()
|
|||
ss << "p {";
|
||||
ss << "font-family:" << viewAnno->Font.getValue() << "; ";
|
||||
ss << "font-size:" << viewAnno->TextSize.getValue() << "pt; "; //units compatibility???
|
||||
if (viewAnno->TextFormat.isValue("Normal")) {
|
||||
if (viewAnno->TextStyle.isValue("Normal")) {
|
||||
ss << "font-weight:normal; font-style:normal; ";
|
||||
} else if (viewAnno->TextFormat.isValue("Bold")) {
|
||||
} else if (viewAnno->TextStyle.isValue("Bold")) {
|
||||
ss << "font-weight:bold; font-style:normal; ";
|
||||
} else if (viewAnno->TextFormat.isValue("Italic")) {
|
||||
} else if (viewAnno->TextStyle.isValue("Italic")) {
|
||||
ss << "font-weight:normal; font-style:italic; ";
|
||||
} else if (viewAnno->TextFormat.isValue("Bold-Italic")) {
|
||||
} else if (viewAnno->TextStyle.isValue("Bold-Italic")) {
|
||||
ss << "font-weight:bold; font-style:italic; ";
|
||||
} else {
|
||||
Base::Console().Warning("%s has invalid TextFormat\n",viewAnno->getNameInDocument());
|
||||
Base::Console().Warning("%s has invalid TextStyle\n",viewAnno->getNameInDocument());
|
||||
ss << "font-weight:normal; font-style:normal; ";
|
||||
}
|
||||
ss << "line-height:" << viewAnno->LineSpace.getValue() << "%; ";
|
||||
|
|
Loading…
Reference in New Issue
Block a user