2009/7/8 Diederik van Lierop <mail@...1689...>:
So we will end up like this A) when dragging with no modifiers we will move the origin to the pointer location (freely, in 2D) B) with ctrl we will have a constrained translation of the origin along the guide C) with shift we will rotate D) with ctrl-shift we will rotate to increments of the absolute angle E) when pressing delete when hovering above a guide in the selector tool, or while dragging a guide, the guide will be deleted. We can even add a context menu as Luca suggested
I just commited the corresponding changes to SVN (rev. 21846). Please test extensively and report anything which is not yet as desired or can still be improved. Apart from the things listed above, I also made the cursor switch correctly between rotation and translation depending on whether Shift is pressed or not (this didn't work 100% before) and also removed the info about keyboard modifiers from the guides dialog (the one which opens when double-clicking on a guide) because it's essentially useless there and consumes a lot of space.
Some comments or issues I couldn't resolve:
1) There is a strange bug which can reproduced as follows: Start Inkscape afresh and drag a guide out of the ruler. Then hover the mouse over it and press Delete. Nothing happens, and the status bar shows the message "Nothing was deleted". Now click anywhere on the canvas, hover again over the guide and press Delete. This time the guide gets deleted as intended. Even when the canvas-click occurs before creating the guide, everything is normal. It seems a bit like the canvas first has to be "activated" before keyboard events are processed correctly.
The reason for this strange behaviour is that the first time the key press is not propagated to sp_dt_guide_event() but gets caught earlier and is then processed in sp_selection_delete(). However, after the canvas-click the propagation to sp_dt_guide_event() works fine. I have no clue where this comes from and any hints are greatly appreciated. BTW, this is also the reason why the cursor doesn't change when you hover over a newly created guide and press Shift (this also only works after a canvas-click).
2) I don't know what to include in the status bar message. With a description of all modifiers the message is definitely too long. Right now I have it say "Shift+drag to rotate, Ctrl+drag to move origin, Del to delete". In particular, I dropped "Drag to move" because it seemed to me that users would expect this intuitively. Other suggestions?
3) IMHO it would be nice if the kind of guide movement could change interactively when pressing/releasing a modifier while dragging a guide. For example, when we start dragging and press Shift (while continuing to drag) it would be nice if the motion switched to a rotation. Or when starting to move the origin by Ctrl+dragging and releasing the Ctrl key then the motion should switch to regular dragging. What do you think? I tried to implement this but encountered a bug similar to the one described in (1) which prevents some keyboard events from being passed to sp_dt_guide_event(). I'm not sure if it's caused by the same thing, though. Any hints where to look are again highly appreciated.
4) LucaDC said he felt that the new cursor which appeared when dragging a guide conveyed a feeling of imprecision, so I changed it back to the original arrow-shaped cursor. For rotation, however, I still use the new cursor. Is everyone happy with that?
5) In principle, snapping guides to other objects should work, but I only manage to snap guides to other guides and to nothing else. Diederik?
6) As mentioned above, guides are now deleted by pressing Del when hovering over them. Is this sufficient or should we implement a second shortcut similar to the original one (like Alt+Ctrl+click)?
Thanks for any comments! Regards, Max