Custom shape size loss - crude hack

Using Dia 0.96.1 on W32

I had a requirement for custom shapes to represent some data objects. Having zoomed
things were looking good. 
I had sucessfully defined a complicated custom shape. 

I then hit the problem (reported several times on this list, I now know) that your custom
shape loses its size, so you have to rescale it on every drag and drop. Yawn!

Being a crude hacker, I went looking for the place where Dia keeps the size of custom
shapes. I found it in .dia/defaults.dia.

I'm aware there's a fix "on the way", but in the meantime...

1) Define custom shape called "testname", save, add to sheet (possibly custom sheet)
2) Add shape to at least one diagram
3) close Dia
4) edit .dia/defaults.dia (use a sensible line editor, Win32 users) 
5) find the stanza describing your custom shape in this file commencing <dia:object
type="diashapes - testname (or whatever name you chose)
6) locate following <dia:attribute name="elem height">  and adjust <dia:real on the next
line to a larger value
7) restart Dia, try drag and drop of custom shape
8) Size right? - all done!
9) Size wrong? goto 3)

If things go badly wrong (Dia won't start or misbehaves), rmdir .dia and start again.

Note that just adding the shape to a sheet isn't apparently enough to get it into
defaults.dia, you need to drag it onto a diagram. If you can't find your shape at step 5),
start again, following more carefully.

Dia seems to want to adjust the <dia:element width> real to whatever it lfeels like, based
on criteria I don't understand.

While this is an annoying procedure, it's less annoying than having to resize shapes every
time imho.

Developers may care to comment on risks and limitiations inherent in this approach, but it
worked for me.

Thanks to Dia contributors for a great free program!
geoff stevens

regrettably the email address above will bounce

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