mirror of https://github.com/GNOME/gimp.git
Fix behavior so that when Alt is down, it appears as if no other modifier
2006-11-11 Michael Natterer <mitch@gimp.org> * app/tools/gimpselectiontool.c (gimp_selection_tool_modifier_key): Fix behavior so that when Alt is down, it appears as if no other modifier was pressed. Fixes bug #349338.
This commit is contained in:
parent
dc2d31c9d7
commit
cb6fe48ccd
|
@ -1,3 +1,10 @@
|
|||
2006-11-11 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/tools/gimpselectiontool.c
|
||||
(gimp_selection_tool_modifier_key): Fix behavior so that when Alt
|
||||
is down, it appears as if no other modifier was pressed.
|
||||
Fixes bug #349338.
|
||||
|
||||
2006-11-09 Kevin Cozens <kcozens@cvs.gnome.org>
|
||||
|
||||
* plug-ins/script-fu/scheme-wrapper.c (marshall_proc_db_call): Use
|
||||
|
|
|
@ -124,43 +124,47 @@ gimp_selection_tool_modifier_key (GimpTool *tool,
|
|||
{
|
||||
GimpChannelOps button_op = options->operation;
|
||||
|
||||
if (state & GDK_MOD1_MASK)
|
||||
if (press)
|
||||
{
|
||||
button_op = selection_tool->saved_operation;
|
||||
if (key == (state & (GDK_SHIFT_MASK |
|
||||
GDK_CONTROL_MASK |
|
||||
GDK_MOD1_MASK)))
|
||||
{
|
||||
/* first modifier pressed */
|
||||
|
||||
selection_tool->saved_operation = options->operation;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (press)
|
||||
if (! (state & (GDK_SHIFT_MASK |
|
||||
GDK_CONTROL_MASK |
|
||||
GDK_MOD1_MASK)))
|
||||
{
|
||||
if (key == (state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK)))
|
||||
{
|
||||
/* first modifier pressed */
|
||||
/* last modifier released */
|
||||
|
||||
selection_tool->saved_operation = options->operation;
|
||||
}
|
||||
button_op = selection_tool->saved_operation;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! (state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK)))
|
||||
{
|
||||
/* last modifier released */
|
||||
}
|
||||
|
||||
button_op = selection_tool->saved_operation;
|
||||
}
|
||||
}
|
||||
|
||||
if ((state & GDK_CONTROL_MASK) && (state & GDK_SHIFT_MASK))
|
||||
{
|
||||
button_op = GIMP_CHANNEL_OP_INTERSECT;
|
||||
}
|
||||
else if (state & GDK_SHIFT_MASK)
|
||||
{
|
||||
button_op = GIMP_CHANNEL_OP_ADD;
|
||||
}
|
||||
else if (state & GDK_CONTROL_MASK)
|
||||
{
|
||||
button_op = GIMP_CHANNEL_OP_SUBTRACT;
|
||||
}
|
||||
if (state & GDK_MOD1_MASK)
|
||||
{
|
||||
/* if alt is down, pretend that neither
|
||||
* shift nor control are down
|
||||
*/
|
||||
button_op = selection_tool->saved_operation;
|
||||
}
|
||||
else if ((state & GDK_CONTROL_MASK) && (state & GDK_SHIFT_MASK))
|
||||
{
|
||||
button_op = GIMP_CHANNEL_OP_INTERSECT;
|
||||
}
|
||||
else if (state & GDK_SHIFT_MASK)
|
||||
{
|
||||
button_op = GIMP_CHANNEL_OP_ADD;
|
||||
}
|
||||
else if (state & GDK_CONTROL_MASK)
|
||||
{
|
||||
button_op = GIMP_CHANNEL_OP_SUBTRACT;
|
||||
}
|
||||
|
||||
if (button_op != options->operation)
|
||||
|
|
Loading…
Reference in New Issue