From a6d9d1d88e4a31033d0a96bf2d9f7e93cbdf4534 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Thu, 18 Nov 2010 19:10:22 +0100 Subject: Fix four minor node tool regressions: * Inverted modifier for spatial/linear grow * PgDn/PgUp keyboard shortcuts for grow * Shift during drag disables snapping * Clicking on the background deselects first the nodes and then the path Fixed bugs: - https://launchpad.net/bugs/647498 - https://launchpad.net/bugs/588628 (bzr r9904) --- src/ui/tool/node-tool.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/ui/tool/node-tool.cpp') diff --git a/src/ui/tool/node-tool.cpp b/src/ui/tool/node-tool.cpp index 57e57b711..8008d79eb 100644 --- a/src/ui/tool/node-tool.cpp +++ b/src/ui/tool/node-tool.cpp @@ -619,8 +619,14 @@ void ink_node_tool_select_point(InkNodeTool *nt, Geom::Point const &/*sel*/, Gdk if (item_clicked == NULL) { // nothing under cursor // if no Shift, deselect - if (!(event->state & GDK_SHIFT_MASK)) { - selection->clear(); + // if there are nodes selected, the first click should deselect the nodes + // and the second should deselect the items + if (!state_held_shift(event->state)) { + if (nt->_selected_nodes->empty()) { + selection->clear(); + } else { + nt->_selected_nodes->clear(); + } } } else { if (held_shift(*event)) { -- cgit v1.2.3