Switch to design mode when Escape gets pressed. Untabbified.

2004-10-25  Simon Budig  <simon@gimp.org>

	* app/tools/gimpvectortool.c: Switch to design mode when
	Escape gets pressed. Untabbified.
This commit is contained in:
Simon Budig
2004-10-25 13:29:32 +00:00
committed by Simon Budig
parent e88a663631
commit fdd150e310
2 changed files with 31 additions and 16 deletions

View File

@ -1,3 +1,8 @@
2004-10-25 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.c: Switch to design mode when
Escape gets pressed. Untabbified.
2004-10-25 Michael Natterer <mitch@gimp.org>
* app/actions/gradient-editor-commands.c

View File

@ -790,12 +790,14 @@ gimp_vector_tool_key_press (GimpTool *tool,
{
GimpVectorTool *vector_tool = GIMP_VECTOR_TOOL (tool);
GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (tool);
GimpVectorOptions *options;
GimpDisplayShell *shell;
gdouble xdist, ydist;
gdouble pixels = 1.0;
if (! vector_tool->vectors)
return TRUE;
return FALSE;
shell = GIMP_DISPLAY_SHELL (draw_tool->gdisp->shell);
@ -856,8 +858,16 @@ gimp_vector_tool_key_press (GimpTool *tool,
vector_tool->have_undo = FALSE;
break;
default:
case GDK_Escape:
options = GIMP_VECTOR_OPTIONS (tool->tool_info->tool_options);
if (options->edit_mode != GIMP_VECTOR_MODE_DESIGN)
g_object_set (options, "vectors-edit-mode",
GIMP_VECTOR_MODE_DESIGN, NULL);
break;
default:
return FALSE;
}
gimp_image_flush (gdisp->gimage);