[gimp/metadata-browser] Revert "app: initalize rectangle tool respecting size constrants"
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] Revert "app: initalize rectangle tool respecting size constrants"
- Date: Fri, 2 Dec 2011 02:11:52 +0000 (UTC)
commit 6ce3af8f6b2f104cb4b803475924a3b721984dcb
Author: Alexia Death <alexiadeath gmail com>
Date: Thu Oct 6 20:16:08 2011 +0300
Revert "app: initalize rectangle tool respecting size constrants"
This reverts commit ef7060251c8cfeadf56e7286acdf00c1967e8eb8.
app/tools/gimprectangletool.c | 43 ++++++----------------------------------
1 files changed, 7 insertions(+), 36 deletions(-)
---
diff --git a/app/tools/gimprectangletool.c b/app/tools/gimprectangletool.c
index 8f9cbc7..f7dba7f 100644
--- a/app/tools/gimprectangletool.c
+++ b/app/tools/gimprectangletool.c
@@ -886,21 +886,17 @@ gimp_rectangle_tool_button_press (GimpTool *tool,
GdkModifierType state,
GimpDisplay *display)
{
- GimpRectangleTool *rect_tool;
- GimpRectangleOptions *options;
- GimpDrawTool *draw_tool;
- GimpRectangleToolPrivate *private;
- GimpRectangleOptionsPrivate *priv_opts;
- gdouble snapped_x, snapped_y;
- gint snap_x, snap_y;
+ GimpRectangleTool *rect_tool;
+ GimpDrawTool *draw_tool;
+ GimpRectangleToolPrivate *private;
+ gdouble snapped_x, snapped_y;
+ gint snap_x, snap_y;
g_return_if_fail (GIMP_IS_RECTANGLE_TOOL (tool));
rect_tool = GIMP_RECTANGLE_TOOL (tool);
- options = GIMP_RECTANGLE_OPTIONS (tool->tool_info->tool_options);
draw_tool = GIMP_DRAW_TOOL (tool);
private = GIMP_RECTANGLE_TOOL_GET_PRIVATE (tool);
- priv_opts = GIMP_RECTANGLE_OPTIONS_GET_PRIVATE (options);
gimp_draw_tool_pause (draw_tool);
@@ -949,33 +945,8 @@ gimp_rectangle_tool_button_press (GimpTool *tool,
/* Remember that this rectangle was created from scratch. */
private->is_new = TRUE;
- if (gimp_rectangle_options_fixed_rule_active (options,
- GIMP_RECTANGLE_TOOL_FIXED_SIZE))
- {
- private->x1 = snapped_x - priv_opts->desired_fixed_size_width / 2;
- private->y1 = snapped_y - priv_opts->desired_fixed_size_height / 2;
- private->x2 = snapped_x + priv_opts->desired_fixed_size_width / 2;
- private->y2 = snapped_y + priv_opts->desired_fixed_size_height / 2;
- }
- else if (gimp_rectangle_options_fixed_rule_active (options,
- GIMP_RECTANGLE_TOOL_FIXED_WIDTH))
- {
- private->x1 = snapped_x - priv_opts->desired_fixed_width / 2;
- private->x2 = snapped_x + priv_opts->desired_fixed_width / 2;
- private->y1 = private->y2 = snapped_y;
- }
- else if (gimp_rectangle_options_fixed_rule_active (options,
- GIMP_RECTANGLE_TOOL_FIXED_HEIGHT))
- {
- private->y1 = snapped_y - priv_opts->desired_fixed_height / 2;
- private->y2 = snapped_y + priv_opts->desired_fixed_height / 2;
- private->x1 = private->x2 = snapped_x;
- }
- else
- {
- private->x1 = private->x2 = snapped_x;
- private->y1 = private->y2 = snapped_y;
- }
+ private->x1 = private->x2 = snapped_x;
+ private->y1 = private->y2 = snapped_y;
gimp_rectangle_tool_update_handle_sizes (rect_tool);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]