Issue #5472 - CRITICAL while using Move tool with arrow keys
In gimp_edit_selection_tool_translate(), perform the active-item
checks even when the effective translation offset is 0, and only
bail afterwards. This avoids erroneously calling
gimp_tool_message_literal() with a NULL message in this case.
(cherry picked from commit 3a462a5e63
)
This commit is contained in:
@ -1084,8 +1084,6 @@ gimp_edit_selection_tool_translate (GimpTool *tool,
|
|||||||
|
|
||||||
0);
|
0);
|
||||||
|
|
||||||
if (inc_x != 0 || inc_y != 0)
|
|
||||||
{
|
|
||||||
switch (translate_type)
|
switch (translate_type)
|
||||||
{
|
{
|
||||||
case GIMP_TRANSFORM_TYPE_SELECTION:
|
case GIMP_TRANSFORM_TYPE_SELECTION:
|
||||||
@ -1184,7 +1182,6 @@ gimp_edit_selection_tool_translate (GimpTool *tool,
|
|||||||
case GIMP_TRANSFORM_TYPE_IMAGE:
|
case GIMP_TRANSFORM_TYPE_IMAGE:
|
||||||
g_return_val_if_reached (FALSE);
|
g_return_val_if_reached (FALSE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (! item)
|
if (! item)
|
||||||
{
|
{
|
||||||
@ -1200,6 +1197,9 @@ gimp_edit_selection_tool_translate (GimpTool *tool,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (inc_x == 0 && inc_y == 0)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
switch (edit_mode)
|
switch (edit_mode)
|
||||||
{
|
{
|
||||||
case GIMP_TRANSLATE_MODE_FLOATING_SEL:
|
case GIMP_TRANSLATE_MODE_FLOATING_SEL:
|
||||||
|
Reference in New Issue
Block a user