[gimp] app: GimpHandleTransformTool: remove shortcuts in is_handle_position_valid()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: GimpHandleTransformTool: remove shortcuts in is_handle_position_valid()
- Date: Sun, 29 Mar 2015 22:14:17 +0000 (UTC)
commit 974ce0b6d176731c85bda936af0f3385de79a721
Author: Michael Natterer <mitch gimp org>
Date: Mon Mar 30 00:12:16 2015 +0200
app: GimpHandleTransformTool: remove shortcuts in is_handle_position_valid()
The check should not depend on trans_info[NUM] because the code that
has the division by zero to avoid doesn't either. Closes bug #721009.
app/tools/gimphandletransformtool.c | 16 ----------------
1 files changed, 0 insertions(+), 16 deletions(-)
---
diff --git a/app/tools/gimphandletransformtool.c b/app/tools/gimphandletransformtool.c
index c002186..e66c2a7 100644
--- a/app/tools/gimphandletransformtool.c
+++ b/app/tools/gimphandletransformtool.c
@@ -783,22 +783,6 @@ is_handle_position_valid (GimpTransformTool *tr_tool,
{
gint i, j, k;
- if (tr_tool->trans_info[N_HANDLES] < 3)
- {
- /* there aren't two other handles */
- return TRUE;
- }
-
- if (tr_tool->trans_info[N_HANDLES] == 3)
- {
- return ((tr_tool->trans_info[X0] - tr_tool->trans_info[X1]) *
- (tr_tool->trans_info[Y1] - tr_tool->trans_info[Y2]) !=
-
- (tr_tool->trans_info[X1] - tr_tool->trans_info[X2]) *
- (tr_tool->trans_info[Y0] - tr_tool->trans_info[Y1]));
- }
-
- /* tr_tool->trans_info[N_HANDLES] == 4 */
for (i = 0; i < 2; i++)
{
for (j = i + 1; j < 3; j++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]