diff --git a/ChangeLog b/ChangeLog index 8b96018298..324cf8d5f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,13 @@ * app/gui/toolbox-menu.c: use the new icons here as well. +2003-08-19 Michael Natterer + + * app/tools/gimppainttool.c + (gimp_paint_tool_oper_update,cursor_update): always look for the + active drawable, not for the active layer. Fixes line and brush + preview drawing for channels. + 2003-08-19 Michael Natterer * app/config/gimpdisplayconfig.[ch] diff --git a/app/tools/gimpbrushtool.c b/app/tools/gimpbrushtool.c index acccdae992..104426a1ac 100644 --- a/app/tools/gimpbrushtool.c +++ b/app/tools/gimpbrushtool.c @@ -31,7 +31,12 @@ #include "config/gimpdisplayconfig.h" +#include "base/boundary.h" +#include "base/pixel-region.h" +#include "base/temp-buf.h" + #include "core/gimp.h" +#include "core/gimpbrush.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" #include "core/gimptoolinfo.h" @@ -51,14 +56,6 @@ #include "gimptoolcontrol.h" #include "tool_manager.h" - -#include "base/boundary.h" -#include "base/pixel-region.h" -#include "base/temp-buf.h" -#include "core/gimpbrush.h" -#include "display/gimpdisplayshell-transform.h" - - #include "gimp-intl.h" @@ -561,7 +558,7 @@ gimp_paint_tool_oper_update (GimpTool *tool, GimpDrawTool *draw_tool; GimpPaintCore *core; GimpDisplayShell *shell; - GimpLayer *layer; + GimpDrawable *drawable; paint_tool = GIMP_PAINT_TOOL (tool); draw_tool = GIMP_DRAW_TOOL (tool); @@ -608,7 +605,7 @@ gimp_paint_tool_oper_update (GimpTool *tool, tool->gdisp = gdisp; } - if ((layer = gimp_image_get_active_layer (gdisp->gimage))) + if ((drawable = gimp_image_active_drawable (gdisp->gimage))) { paint_tool->brush_x = coords->x; paint_tool->brush_y = coords->y; @@ -625,7 +622,7 @@ gimp_paint_tool_oper_update (GimpTool *tool, core->cur_coords = *coords; - gimp_item_offsets (GIMP_ITEM (layer), &off_x, &off_y); + gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); core->cur_coords.x -= off_x; core->cur_coords.y -= off_y; @@ -682,7 +679,7 @@ gimp_paint_tool_cursor_update (GimpTool *tool, GdkModifierType state, GimpDisplay *gdisp) { - if (gimp_image_get_active_layer (gdisp->gimage)) + if (gimp_image_active_drawable (gdisp->gimage)) { GimpDrawTool *draw_tool; GimpDisplayShell *shell; diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c index acccdae992..104426a1ac 100644 --- a/app/tools/gimppainttool.c +++ b/app/tools/gimppainttool.c @@ -31,7 +31,12 @@ #include "config/gimpdisplayconfig.h" +#include "base/boundary.h" +#include "base/pixel-region.h" +#include "base/temp-buf.h" + #include "core/gimp.h" +#include "core/gimpbrush.h" #include "core/gimpdrawable.h" #include "core/gimpimage.h" #include "core/gimptoolinfo.h" @@ -51,14 +56,6 @@ #include "gimptoolcontrol.h" #include "tool_manager.h" - -#include "base/boundary.h" -#include "base/pixel-region.h" -#include "base/temp-buf.h" -#include "core/gimpbrush.h" -#include "display/gimpdisplayshell-transform.h" - - #include "gimp-intl.h" @@ -561,7 +558,7 @@ gimp_paint_tool_oper_update (GimpTool *tool, GimpDrawTool *draw_tool; GimpPaintCore *core; GimpDisplayShell *shell; - GimpLayer *layer; + GimpDrawable *drawable; paint_tool = GIMP_PAINT_TOOL (tool); draw_tool = GIMP_DRAW_TOOL (tool); @@ -608,7 +605,7 @@ gimp_paint_tool_oper_update (GimpTool *tool, tool->gdisp = gdisp; } - if ((layer = gimp_image_get_active_layer (gdisp->gimage))) + if ((drawable = gimp_image_active_drawable (gdisp->gimage))) { paint_tool->brush_x = coords->x; paint_tool->brush_y = coords->y; @@ -625,7 +622,7 @@ gimp_paint_tool_oper_update (GimpTool *tool, core->cur_coords = *coords; - gimp_item_offsets (GIMP_ITEM (layer), &off_x, &off_y); + gimp_item_offsets (GIMP_ITEM (drawable), &off_x, &off_y); core->cur_coords.x -= off_x; core->cur_coords.y -= off_y; @@ -682,7 +679,7 @@ gimp_paint_tool_cursor_update (GimpTool *tool, GdkModifierType state, GimpDisplay *gdisp) { - if (gimp_image_get_active_layer (gdisp->gimage)) + if (gimp_image_active_drawable (gdisp->gimage)) { GimpDrawTool *draw_tool; GimpDisplayShell *shell;