Add key bindable "Hide other layers" command (fix #5291)#5527
Conversation
aseprite-bot
left a comment
There was a problem hiding this comment.
clang-tidy made some suggestions
| } | ||
| } | ||
|
|
||
| void ToggleOtherLayersVisibilityCommand::onExecute(Context* ctx) |
There was a problem hiding this comment.
warning: method 'onExecute' can be made static [readability-convert-member-functions-to-static]
src/app/commands/toggle_other_layers_visibility.cpp:25:
- void onExecute(Context* ctx) override;
+ static void onExecute(Context* ctx) override;|
|
||
| void ToggleOtherLayersVisibilityCommand::onExecute(Context* ctx) | ||
| { | ||
| ContextReader reader(ctx); |
There was a problem hiding this comment.
warning: variable 'reader' of type 'ContextReader' can be declared 'const' [misc-const-correctness]
| ContextReader reader(ctx); | |
| ContextReader const reader(ctx); |
| } | ||
|
|
||
| // Hide everything or restore alternative state | ||
| bool oneWithInternalState = false; |
There was a problem hiding this comment.
warning: variable 'oneWithInternalState' of type 'bool' can be declared 'const' [misc-const-correctness]
| bool oneWithInternalState = false; | |
| bool const oneWithInternalState = false; |
| { | ||
| } | ||
|
|
||
| void showChildrenLayers(const LayerGroup* layerGroup, Doc* doc) |
There was a problem hiding this comment.
It looks like a static standalone function used only in this file:
| void showChildrenLayers(const LayerGroup* layerGroup, Doc* doc) | |
| static void show_children_layers(const LayerGroup* layerGroup, Doc* doc) |
827c67c to
88b949d
Compare
|
Going to rename the command to SoloLayer + restore the possibility to soloing several layers dragging the mouse with Alt key (this was lost with this PR). |
…rite#5527) We already have a "View > Preview > Hide Other Layers" command, so we prefer a command name that is well-known in software (soloing a layer) for this.
…eline eye icons Minor regression from aseprite#5527
No description provided.