
bbs[pos].anchor = 0.5 * layout[0] * bbs[pos].bbox.min()[dim] + 0.5 * layout[1] * bbs[pos].bbox.max()[dim];
Thank you! I committed this change so it will be in 0.39. Now all distribute modes work as expected. This fixes bug 990112.
BTW, I finished refactoring the align dialog to use gtkmm and more OO code. Now I'll add the align nodes features.
How is it going to look in terms of UI? I think the most intuitive would be to make it work on selected nodes when the node edit tool is active on the active desktop, and on selected objects otherwise. This way you need no additional buttons or switches in the dialog.
Also it would be nice to disable all or some of the buttons depending on what is selected. Thus, if no objects or only object is selected, all align/distribute buttons are grayed out; if several nodes are selected, "distribute top/bottom/right/left" are disabled because they make no sense for sizeless nodes (only distribute centers and equi-spaced remain).
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.
Draggable notebook tabs may be a good idea - it will let one combine all the tabs used frequently into one dialog and have only that dialog open, thus saving space. But it's likely to be rather difficult to implement, it will very much disrupt our old dialogs code.
Multiple instances of the same dialog does not sound like a good idea at all. I think it will be just confusing without any advantage.