app: fix CRITICAL when initializing the perspective-clone tool

When initializaing the perspective-clone tool in paint mode, the
GimpDrawTool may already be active, causing the call to
gimp_draw_tool_start() to fail with a CRITICAL.  Stop the draw tool
first, if active, to avoid that.
This commit is contained in:
Ell 2019-01-31 09:06:22 -05:00
parent e5c9314a88
commit 07d2d5af5a
1 changed files with 3 additions and 0 deletions

View File

@ -260,6 +260,9 @@ gimp_perspective_clone_tool_initialize (GimpTool *tool,
clone_tool);
/* start drawing the bounding box and handles... */
if (gimp_draw_tool_is_active (GIMP_DRAW_TOOL (tool)))
gimp_draw_tool_stop (GIMP_DRAW_TOOL (tool));
gimp_draw_tool_start (GIMP_DRAW_TOOL (tool), display);
/* Save the current transformation info */