[dia] StdProps: make TextProperty::new initialize it's TextAttributes



commit c05f9a18d03199bc19e7a93ecb5b55c76e57ca7f
Author: Hans Breuer <hans breuer org>
Date:   Fri Oct 12 12:37:27 2012 +0200

    StdProps: make TextProperty::new initialize it's TextAttributes

 lib/prop_text.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/lib/prop_text.c b/lib/prop_text.c
index e8d3221..1bd73b7 100644
--- a/lib/prop_text.c
+++ b/lib/prop_text.c
@@ -35,6 +35,7 @@
 #include "propinternals.h"
 #include "text.h"
 #include "group.h"
+#include "attributes.h"
 
 /*****************************************************/
 /* The STRING, FILE and MULTISTRING property types.  */
@@ -359,8 +360,14 @@ static const PropertyOps fileprop_ops = {
 static TextProperty *
 textprop_new(const PropDescription *pdesc, PropDescToPropPredicate reason)
 {
+  DiaFont *font;
+  real height;
   TextProperty *prop = g_new0(TextProperty,1);
   initialize_property(&prop->common,pdesc,reason);
+  attributes_get_default_font (&font, &height);
+  /* minimum atribute intialization */
+  prop->attr.font = g_object_ref (font);
+  prop->attr.height = height;
   prop->text_data = NULL;
   return prop;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]