Re: [PATCH] Database shapes and start arrow



On Apr 25, 2012, at 2:58 PM, Hans Breuer wrote:

At 25.04.2012 00:36, Jim Ursetto wrote:
On Apr 24, 2012, at 3:40 PM, Hans Breuer wrote:
This is not the way backward compatibility is handled in Dia. The
right behaviour would be to initialize to the previous default without
any warning whatsoever.


OK.  But I don't see how to set the default value for a missing optional
property.  It seems to set to the object creation default, which will be
whatever the current default start arrow is at load time; this is
obviously wrong.  I need to override this to "no arrow" when loading an
old file.  Suggestions?

Look at e.g. http://git.gnome.org/browse/dia/commit/?id=aeb71aca
for an example.

I've made the value optional and suppressed the warning in
my own copy prior to my last mail.

However, this commit doesn't appear to address the problem above,
as it hardcodes the default value to color_black (or white).
This does not work for the start arrow case, because the start
arrow type is taken from the current setting in the toolbox,
so it cannot be hardcoded.

As I said above, if you load a file with a missing start
arrow and the attribute is optional, it takes on the value
given in the create function--which is the current value set
in the toolbox.  Obviously, this is wrong--you should not
have your drawing changed when loading it.

Hardcoding the start arrow value to none works at load time but then
you cannot set the default using the toolbox.

So, a solution for this is needed, if possible.

Still I'm not convinced that an extra start arrow is an improvement at all.

The intent was to support things like crow's foot notation, which
uses arrows on both sides.

Jim



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