[gimp/gimp-2-8] cage tool: fix handle added in the wrong side of the cage
- From: Michael Murà <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] cage tool: fix handle added in the wrong side of the cage
- Date: Fri, 11 May 2012 03:43:11 +0000 (UTC)
commit cb2de506971d8b059a472336cf2d12eb2a8ab226
Author: Michael Murà <batolettre gmail com>
Date: Fri May 11 12:34:53 2012 +0900
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
app/tools/gimpcagetool.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/tools/gimpcagetool.c b/app/tools/gimpcagetool.c
index 2ee55b7..7880e59 100644
--- a/app/tools/gimpcagetool.c
+++ b/app/tools/gimpcagetool.c
@@ -565,7 +565,7 @@ gimp_cage_tool_button_press (GimpTool *tool,
case CAGE_STATE_WAIT:
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
* and move it
@@ -608,7 +608,7 @@ gimp_cage_tool_button_press (GimpTool *tool,
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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]