Does it ? I think it doesn't:variables for this -- the Tool already has userdata that could hold the former tool data.
struct _Tool {
ToolType type;/* Action functions */ ButtonPressFunc button_press_func; ButtonReleaseFunc button_release_func; MotionFunc motion_func; DoubleClickFunc double_click_func; };
... and using tool_select to select the new tool is not exactly right because it will free the Tool structure.
There are of course many solutions available:
- add userdata field to Tool
- introduce a new variable transient_tool (separate from active_tool), which would be mostly NULL unless middle button panning (and similar functions, triggered by Shift- Ctrl- Alt- dragging, like Ctrl-dragging clone) is in progress (best OOD-wise I think)
- add former state field to ScrollTool, and cast the pointer+check userdata instead of checking is_middle_panning (breaks encapsulation => not very futureproof)
What do you think ?
I'll try to include it in the fixed patch. Of course, there are situations where it isn't a good idea (two wheel mice, one wheel for X one for Y?).Instant zoom would probably be highly useful. That sounds like a good combo.
Krzysztof
_______________________________________________ Dia-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/dia-list FAQ at http://www.lysator.liu.se/~alla/dia/faq.html Main page at http://www.lysator.liu.se/~alla/dia
