cage tool: fix handle added in the wrong side of the cage
This happened when: 1) cage still open 2) clicking on the edge between the first and the last handle
This commit is contained in:
@ -565,7 +565,7 @@ gimp_cage_tool_button_press (GimpTool *tool,
|
|||||||
case CAGE_STATE_WAIT:
|
case CAGE_STATE_WAIT:
|
||||||
if (ct->cage_complete == FALSE)
|
if (ct->cage_complete == FALSE)
|
||||||
{
|
{
|
||||||
if (handle == -1 && edge == -1)
|
if (handle == -1 && edge <= 0)
|
||||||
{
|
{
|
||||||
/* User clicked on the background, we add a new handle
|
/* User clicked on the background, we add a new handle
|
||||||
* and move it
|
* and move it
|
||||||
@ -608,7 +608,7 @@ gimp_cage_tool_button_press (GimpTool *tool,
|
|||||||
|
|
||||||
ct->tool_state = CAGE_STATE_MOVE_HANDLE;
|
ct->tool_state = CAGE_STATE_MOVE_HANDLE;
|
||||||
}
|
}
|
||||||
else if (edge >= 0)
|
else if (edge > 0)
|
||||||
{
|
{
|
||||||
/* User clicked on an edge, we add a new handle here and select it */
|
/* User clicked on an edge, we add a new handle here and select it */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user