app: be more deterministic in a list view's name column (name editing etc.)

We handle multi-selection by letting GtkTreeView handle button press
when the widget is in GTK_SELECTION_MULTIPLE mode. Change that code to
only do that when one of the participating modifiers (shift and
control on Linux and Windows, shift and cmd on macOS) is pressed.

This makes sure that the same thing is not randomly handled by two
different pieces of code, and probably fixes bug #738440, tho I can't
be sure.
This commit is contained in:
Michael Natterer 2016-11-16 13:02:09 +01:00
parent 5acd2ed99e
commit 61f91c7cd2

View file

@ -1061,6 +1061,17 @@ gimp_container_tree_view_button_press (GtkWidget *widget,
multisel_mode = (gtk_tree_selection_get_mode (tree_view->priv->selection)
== GTK_SELECTION_MULTIPLE);
if (! (bevent->state & (gimp_get_extend_selection_mask () |
gimp_get_modify_selection_mask ())))
{
/* don't chain up for multi-selection handling if none of
* the participating modifiers is pressed, we implement
* button_press completely ourselves for a reason and don't
* want the default implementation mess up our state
*/
multisel_mode = FALSE;
}
gtk_tree_model_get_iter (tree_view->model, &iter, path);
gtk_tree_model_get (tree_view->model, &iter,