Cage tool: in cage mode, remove selected handles when hitting backspace

This commit is contained in:
Michael Muré 2011-04-21 11:44:47 +02:00
parent bcd76a3d5b
commit cc247b3e66
1 changed files with 11 additions and 1 deletions

View File

@ -398,7 +398,17 @@ gimp_cage_tool_key_press (GimpTool *tool,
{
case GDK_KEY_BackSpace:
if (! ct->cage_complete && ct->tool_state == CAGE_STATE_WAIT)
gimp_cage_tool_remove_last_handle (ct);
{
gimp_cage_tool_remove_last_handle (ct);
}
else if (ct->cage_complete && ct->tool_state == CAGE_STATE_WAIT)
{
gimp_cage_config_remove_selected_points(ct->config);
/* if the cage have less than 3 handles, we reopen it */
if (gimp_cage_config_get_n_points(ct->config) <= 2)
ct->cage_complete = FALSE;
}
return TRUE;
case GDK_KEY_Return: