From da12388bd2ca6f3f9984d78f1ad63f309fc73fc3 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Fri, 17 Dec 2004 12:31:11 +0000 Subject: [PATCH] take drawable offsets into account. Fixes bug #161508. 2004-12-17 Sven Neumann * app/tools/gimpimagemaptool.c (gimp_image_map_tool_pick_color): take drawable offsets into account. Fixes bug #161508. --- ChangeLog | 5 +++++ app/tools/gimpimagemaptool.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index 10bb6e77f0..2ea5bf7116 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-12-17 Sven Neumann + + * app/tools/gimpimagemaptool.c (gimp_image_map_tool_pick_color): + take drawable offsets into account. Fixes bug #161508. + 2004-12-17 Sven Neumann * docs/gimp-remote.1.in diff --git a/app/tools/gimpimagemaptool.c b/app/tools/gimpimagemaptool.c index 96d14590ac..e19a6b346f 100644 --- a/app/tools/gimpimagemaptool.c +++ b/app/tools/gimpimagemaptool.c @@ -410,6 +410,11 @@ gimp_image_map_tool_pick_color (GimpColorTool *color_tool, gint *color_index) { GimpImageMapTool *tool = GIMP_IMAGE_MAP_TOOL (color_tool); + gint off_x, off_y; + + gimp_item_offsets (GIMP_ITEM (tool->drawable), &off_x, &off_y); + x -= off_x; + y -= off_y; *sample_type = gimp_drawable_type (tool->drawable);