Comment 1 for bug 1364231

Revision history for this message
su_v (suv-lp) wrote :

Current status:
- no verbs exists which calls tools_switch_by_item()
- tools_switch_by_item() requires a coordinate (Geom::Point) of where the double-click occurred (used to position the text cursor when double-clicking a text object); such a point does not exist if this command is called via keyboard shortcuts
- the relevant verb context already provides the center of the bbox; one could consider to pass the top left or bottom right corner point of the bbox to the new verb to position text cursor at start / end of the text (if the current selection is a text)
- to be discussed: what happens if the current selection contains multiple different objects? Switch to the corresponding tool of the first (last, bottom-most, top-most) item in the selection list? Don't attempt to switch tool at all?

Double-click is handled here:
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/src/ui/tools/select-tool.cpp#L473
Definition of tools_switch_by_item():
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/src/tools-switch.cpp#L159
Verb context:
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/view/head:/src/verbs.cpp#L1485