Commit 7d893541 authored by Claes Sjofors's avatar Claes Sjofors

Ge object text size copy fix

parent 56996ce2
......@@ -71,6 +71,15 @@ GrowText::GrowText( GrowCtx *glow_ctx, const char *name, const char *text1, doub
draw( &ctx->mw, (GlowTransform *)NULL, highlight, hot, NULL, NULL);
}
GrowText::GrowText( const GrowText& n) : GlowText(n)
{
memcpy( this, &n, sizeof(n));
if ( n.text) {
text = (char *) malloc( strlen(n.text)+1);
strcpy( text, n.text);
}
}
GrowText::~GrowText()
{
ctx->object_deleted( this);
......@@ -1181,3 +1190,4 @@ void GrowText::export_flow( GlowExportFlow *ef)
{
ef->text( this);
}
......@@ -77,6 +77,8 @@ class GrowText : public GlowText {
glow_mDisplayLevel display_lev = glow_mDisplayLevel_1,
int nodraw = 0);
GrowText( const GrowText& x);
//! Destructor
~GrowText();
......@@ -502,6 +504,7 @@ class GrowText : public GlowText {
void export_flow( GlowExportFlow *ef);
glow_eDrawType get_text_color() { return color_drawtype;}
};
/*@}*/
......
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