tools: Prevent bucket fill on link/vector layers
Resolves #14993 We currently prevent paint tools from painting on link or vector layers. However, we had not added this protection to the bucket fill tool. This patch copies over the relevant if statements to prevent this.
This commit is contained in:
parent
baa4825880
commit
36330a271a
1 changed files with 18 additions and 1 deletions
|
|
@ -39,6 +39,7 @@
|
|||
#include "core/gimpimageproxy.h"
|
||||
#include "core/gimpitem.h"
|
||||
#include "core/gimplineart.h"
|
||||
#include "core/gimplinklayer.h"
|
||||
#include "core/gimppickable.h"
|
||||
#include "core/gimppickable-contiguous-region.h"
|
||||
#include "core/gimpprogress.h"
|
||||
|
|
@ -50,6 +51,8 @@
|
|||
|
||||
#include "operations/layer-modes/gimp-layer-modes.h"
|
||||
|
||||
#include "path/gimpvectorlayer.h"
|
||||
|
||||
#include "widgets/gimphelp-ids.h"
|
||||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
|
|
@ -620,7 +623,21 @@ gimp_bucket_fill_tool_button_press (GimpTool *tool,
|
|||
return;
|
||||
}
|
||||
|
||||
if (gimp_item_is_content_locked (GIMP_ITEM (drawable), &locked_item))
|
||||
if (gimp_item_is_link_layer (GIMP_ITEM (drawable)))
|
||||
{
|
||||
gimp_tool_message_literal (tool, display,
|
||||
_("Link layers must be rasterized "
|
||||
"before they can be painted on."));
|
||||
return;
|
||||
}
|
||||
else if (gimp_item_is_vector_layer (GIMP_ITEM (drawable)))
|
||||
{
|
||||
gimp_tool_message_literal (tool, display,
|
||||
_("Vector layers must be rasterized "
|
||||
"before they can be painted on."));
|
||||
return;
|
||||
}
|
||||
else if (gimp_item_is_content_locked (GIMP_ITEM (drawable), &locked_item))
|
||||
{
|
||||
gimp_tool_message_literal (tool, display,
|
||||
_("The selected layer's pixels are locked."));
|
||||
|
|
|
|||
Loading…
Reference in a new issue