On Mon, 14 Jun 1999, Ben Hochstedler wrote:

> > If it was clean and maintainable, yes. The problem is that it touches a
> > lot of the core Dia functionallity. If breaks the separation between
> > layers, which makes updating connections slower and makes separate
> > updating of the active layer only impossible (stuff like
> > data_update_extents() and layer_update_extents() would have to scan
> > through all objects in all layers on each update).
> 
> What exactly do you mean by updating connections? When does that happen?
> 
> Why would data_update_extents() and layer_update_extents() have to scan
> all the other layers when the objects in the other layers can't be
> moved or selected (only connected to or disconnected from)?  I can see
> how it would become very complicated if objects in different layers
> could be copied & pasted, grouped & ungrouped, or edited together
> in some other ways.  That's why I'm only suggesting to allow connections
> be made or disconnected between layers.  Once that's down, then maybe
> we could look at how complicated & slow it would make things to try to
> manipulate objects in different layers together in other ways, but I 
> really don't want to get into that right now.

If objects in the active layer are connected to objects in another layer
(which in turn may be connected to objects in yet other layers), and the
object is moved, resized or otherwise changed this might trigger a change
of the position, size and orientation of the connected objects (and
therefore *any* object in *any* layer).

And then when you need to recalculate the extents after having moved one
object you can't do as usual, recalculate the extents for the active layer
by looping over all objects in it and doing rectangle_union and then merge
it with the extents of the other layers. Because the extents of the other
layers may have changed too. 
 
> > In short. I won't do it myself. But i would take patches for it, *after*
> > the undo stuff is finished.
> 
> Okay.  btw, I'm ready to run Purify on Dia at any time.  Should I
> wait to do that after you have the undo stuff finished?
 Yes, wait till it's done. Now it's full of bugs and core-dumps.
 
> > I don't understand why you need to change the DTD at all. The object
> > references are good enought to reference across layers as it is now.
> 
> Ah!  It wasn't entirely apparent that the set of object ID's were unique
> to a diagram.  I figured an object can't exist in a diagram unless its
> contained in a layer, then the ID's were unique to the layer.  This will
> make things easier.
The id's are generated by Dia. They are unique in the whole diagram.
Basically they are serialized pointers to objects.

/ Alex

Reply via email to