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 ...@@ -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); 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() GrowText::~GrowText()
{ {
ctx->object_deleted( this); ctx->object_deleted( this);
...@@ -1181,3 +1190,4 @@ void GrowText::export_flow( GlowExportFlow *ef) ...@@ -1181,3 +1190,4 @@ void GrowText::export_flow( GlowExportFlow *ef)
{ {
ef->text( this); ef->text( this);
} }
...@@ -77,6 +77,8 @@ class GrowText : public GlowText { ...@@ -77,6 +77,8 @@ class GrowText : public GlowText {
glow_mDisplayLevel display_lev = glow_mDisplayLevel_1, glow_mDisplayLevel display_lev = glow_mDisplayLevel_1,
int nodraw = 0); int nodraw = 0);
GrowText( const GrowText& x);
//! Destructor //! Destructor
~GrowText(); ~GrowText();
...@@ -502,6 +504,7 @@ class GrowText : public GlowText { ...@@ -502,6 +504,7 @@ class GrowText : public GlowText {
void export_flow( GlowExportFlow *ef); void export_flow( GlowExportFlow *ef);
glow_eDrawType get_text_color() { return color_drawtype;} 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