dia r3983 - trunk/objects/FS



Author: hans
Date: Fri May  2 19:06:10 2008
New Revision: 3983
URL: http://svn.gnome.org/viewvc/dia?rev=3983&view=rev

Log:
2008-05-02  Hans Breuer  <hans breuer org>

	* objects/FS/flow-ortho.c objects/FS/flow-poly.c objects/FS/flow.c :
	objects/FS/flow.c : Object::copy() was not calling Object::update()
	resulting in uninitialized memory, crashing or corrupted diagrams.
	Not anymore, fixing bug #456270


Modified:
   trunk/objects/FS/flow-ortho.c
   trunk/objects/FS/flow-poly.c
   trunk/objects/FS/flow.c

Modified: trunk/objects/FS/flow-ortho.c
==============================================================================
--- trunk/objects/FS/flow-ortho.c	(original)
+++ trunk/objects/FS/flow-ortho.c	Fri May  2 19:06:10 2008
@@ -491,11 +491,13 @@
   orthconn_copy(orth, neworth);
 
   neworthflow->text_handle = orthflow->text_handle;
+  neworthflow->text_handle.connected_to = NULL;
   newobj->handles[orth->numpoints-1] = &neworthflow->text_handle;
 
   neworthflow->text = text_copy(orthflow->text);
   neworthflow->type = orthflow->type;
 
+  orthflow_update_data(neworthflow);
   return &neworthflow->orth.object;
 }
 

Modified: trunk/objects/FS/flow-poly.c
==============================================================================
--- trunk/objects/FS/flow-poly.c	(original)
+++ trunk/objects/FS/flow-poly.c	Fri May  2 19:06:10 2008
@@ -443,6 +443,7 @@
   newflow->text = text_copy(flow->text);
   newflow->type = flow->type;
 
+  flow_update_data(newflow);
   return &newflow->connection.object;
 }
 

Modified: trunk/objects/FS/flow.c
==============================================================================
--- trunk/objects/FS/flow.c	(original)
+++ trunk/objects/FS/flow.c	Fri May  2 19:06:10 2008
@@ -424,6 +424,7 @@
   flow_update_data(flow);
   *handle1 = obj->handles[0];
   *handle2 = obj->handles[1];
+  
   return &flow->connection.object;
 }
 
@@ -451,11 +452,13 @@
   connection_copy(conn, newconn);
 
   newflow->text_handle = flow->text_handle;
+  newflow->text_handle.connected_to = NULL;
   newobj->handles[2] = &newflow->text_handle;
   newflow->textpos = flow->textpos;
   newflow->text = text_copy(flow->text);
   newflow->type = flow->type;
 
+  flow_update_data(newflow);
   return &newflow->connection.object;
 }
 
@@ -547,6 +550,7 @@
   flow->text_handle.type = HANDLE_MINOR_CONTROL;
   flow->text_handle.connect_type = HANDLE_NONCONNECTABLE;
   flow->text_handle.connected_to = NULL;
+  flow->text_handle.pos = flow->text->position;
   obj->handles[2] = &flow->text_handle;
 
   extra->start_long = 



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