split out default attribute setting and size adjustment into separate functions #42

Merged
merged 1 commit into from Aug 6, 2012

Projects

None yet

2 participants

@byorgey
diagrams member

This has been on the 'to-do' list for a while, but we actually just discovered a bug in the cairo/gtk backend that needs this to be fixed. The GTK backend has an option to skip the adjustments -- in order to have better control over the coordinates used etc. (for dealing with mouse clicks and so on). However, since we were conflating size adjustment and default coordinate setting, the bypass mode also bypassed setting default attributes, leading to things like lines being mistakenly drawn using the fill color, etc. (A patch for the cairo backend will follow separately.)

This patch just splits the functionality of adjustDia2D into two separate functions. The semantics of adjustDia2D itself should be unchanged, so this will not break any existing code; it just makes it possible to invoke only parts of it as necessary.

@byorgey
diagrams member
@fryguybob fryguybob merged commit 6665b88 into master Aug 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment