While refactoring and commenting the align dialog code, I found a weird thing in, which I think is a bug. It should cause the distribute right and distribute top doing nothing, and distribute centers to work wrong. The code is in the static void sp_align_distribute_h_or_v_clicked(GtkWidget *, gchar const *layout, NR::Dim2 dim) function, while computing anchors to sort bounding boxes on the X or Y axis. The code currently in CVS does that : bbs[pos].anchor = 0.5 * layout[0] * bbs[pos].bbox.min()[dim] + 0.5 * layout[0] * bbs[pos].bbox.max()[dim];
Layout being an array of 3 elements. The last one does not interest us here. The first one is a coefficient for the beginning of the axis (ie left for X, top for Y), the second for the end. Here, you can see the *SAME* coefficient applied to the "beginning" of the bbox and the "end of the bbox". The patch is easy and the correct code is :
bbs[pos].anchor = 0.5 * layout[0] * bbs[pos].bbox.min()[dim] + 0.5 * layout[1] * bbs[pos].bbox.max()[dim];
Looks like it's a regression between 1.20 and 1.19 of align.cpp: http://cvs.sourceforge.net/viewcvs.py/inkscape/inkscape/src/dialogs/align.cp...
Hope this helps.
BTW, I finished refactoring the align dialog to use gtkmm and more OO code. Now I'll add the align nodes features.
I also would like to talk about the possibility to use the dialogs like in gimp2 (drag and dropable notebook tabs, multiple instances of the same dialog, etc) I started a very simple implementation, but I'm not sure you want to do that. Now I'm used to it, I find it easier to remember keyboard shortcuts and have transient dialogs. No mess with tabs. PLease let me know your opinions.
Kindly, obi.