Commit 56996ce2 authored by Claes Sjofors's avatar Claes Sjofors

Ge object text size fix for attribute editor

parent 40516f33
......@@ -1820,9 +1820,11 @@ int grow_GetObjectAttrInfo( grow_tObject object, char *transtab,
attrinfo[i++].size = sizeof( op->n_name);
strcpy( attrinfo[i].name, "Text");
attrinfo[i].value_p = &op->text;
attrinfo[i].value_p = malloc(200);
op->get_text( (char *)attrinfo[i].value_p, 200);
attrinfo[i].info_type = grow_eInfoType_DynamicText;
attrinfo[i].type = glow_eType_String;
attrinfo[i++].size = sizeof( op->text);
attrinfo[i++].size = 200;
strcpy( attrinfo[i].name, "Adjustment");
attrinfo[i].value_p = &op->adjustment;
......@@ -3599,6 +3601,9 @@ void grow_FreeObjectAttrInfo( grow_sAttrInfo *attrinfo)
case grow_eInfoType_Dynamic:
free( (char *) info_p->value_p);
break;
case grow_eInfoType_DynamicText:
free( (char *) info_p->value_p);
break;
default:
;
}
......@@ -3769,12 +3774,15 @@ void grow_UpdateObject( grow_tCtx ctx, grow_tObject object,
((GrowSubAnnot *)object)->draw( &ctx->mw, INT_MIN, INT_MIN, INT_MAX, INT_MAX);
break;
case glow_eObjectType_GrowText:
// Set changed dynamic
info_p = info;
while ( info_p->info_type != grow_eInfoType_End)
{
switch( info_p->info_type)
{
while ( info_p->info_type != grow_eInfoType_End) {
switch( info_p->info_type) {
case grow_eInfoType_DynamicText:
if ( strcmp( ((GrowText *)object)->text, (char *)info_p->value_p) != 0)
((GrowText *)object)->set_text( (char *)info_p->value_p);
break;
case grow_eInfoType_Dynamic:
{
char *dynamic;
......
......@@ -78,7 +78,8 @@ extern "C" {
grow_eInfoType_Annot,
grow_eInfoType_Dynamic,
grow_eInfoType_Arg,
grow_eInfoType_Image
grow_eInfoType_Image,
grow_eInfoType_DynamicText
} grow_eInfoType;
typedef struct {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment