app: improve GimpFilterTool::can_pick()

Make sure the drawable we're about to pick from is actually the
filter tool's drawable.
This commit is contained in:
Ell 2017-05-03 14:46:39 -04:00
parent bfadac145b
commit bd5ec4613b
1 changed files with 4 additions and 0 deletions

View File

@ -801,8 +801,12 @@ gimp_filter_tool_can_pick_color (GimpColorTool *color_tool,
GimpDisplay *display)
{
GimpFilterTool *filter_tool = GIMP_FILTER_TOOL (color_tool);
GimpImage *image = gimp_display_get_image (display);
gboolean pick_abyss;
if (gimp_image_get_active_drawable (image) != filter_tool->drawable)
return FALSE;
pick_abyss =
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (filter_tool->active_picker),
"picker-pick-abyss"));