[gimp] app: simplify the drawing code
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: simplify the drawing code
- Date: Wed, 29 Sep 2010 22:39:57 +0000 (UTC)
commit a8259996e4d2efed44ff3d05cccecff378df998f
Author: Michael Natterer <mitch gimp org>
Date: Thu Sep 30 00:39:15 2010 +0200
app: simplify the drawing code
by using gimp_draw_tool_add_guide_line() for the active guide too.
app/tools/gimpmovetool.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/app/tools/gimpmovetool.c b/app/tools/gimpmovetool.c
index 550c368..19e4534 100644
--- a/app/tools/gimpmovetool.c
+++ b/app/tools/gimpmovetool.c
@@ -45,7 +45,7 @@
#include "widgets/gimphelp-ids.h"
-#include "display/gimpcanvasguide.h"
+#include "display/gimpcanvasitem.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
#include "display/gimpdisplayshell-appearance.h"
@@ -775,14 +775,12 @@ gimp_move_tool_draw (GimpDrawTool *draw_tool)
{
GimpCanvasItem *item;
- item = gimp_canvas_guide_new (gimp_guide_get_orientation (move->guide),
- gimp_guide_get_position (move->guide));
+ item = gimp_draw_tool_add_guide_line (draw_tool,
+ gimp_guide_get_orientation (move->guide),
+ gimp_guide_get_position (move->guide));
g_object_set (item, "guide-style", TRUE, NULL);
gimp_canvas_item_set_highlight (item, TRUE);
-
- gimp_draw_tool_add_item (draw_tool, item);
- g_object_unref (item);
}
if (move->moving_guide && move->guide_position != -1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]