Skip to content

Commit

Permalink
Fix Magic Wand should "refer to visible layers" anyway when the activ…
Browse files Browse the repository at this point in the history
…e layer is hidden (fix aseprite#3939)
  • Loading branch information
Gasparoken authored and dacap committed Jul 25, 2023
1 parent a2e3ab4 commit ab2d7f7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/app/ui/editor/tool_loop_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,11 +829,15 @@ tools::ToolLoop* create_tool_loop(
return nullptr;
}
else if (!layer->isVisibleHierarchy()) {
StatusBar::instance()->showTip(
1000,
fmt::format(Strings::statusbar_tips_layer_x_is_hidden(),
layer->name()));
return nullptr;
auto& toolPref = Preferences::instance().tool(params.tool);
if (toolPref.floodfill.referTo() ==
app::gen::FillReferTo::ACTIVE_LAYER) {
StatusBar::instance()->showTip(
1000,
fmt::format(Strings::statusbar_tips_layer_x_is_hidden(),
layer->name()));
return nullptr;
}
}
// If the active layer is read-only.
else if (layer_is_locked(editor)) {
Expand Down

0 comments on commit ab2d7f7

Please sign in to comment.