mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-26 03:35:23 +00:00
Fix issue #548 - Avoid moving hidden layers or auto-selecting them
This commit is contained in:
parent
4a1ee6d557
commit
aee7eb7bd4
@ -208,6 +208,10 @@ bool StandbyState::onMouseDown(Editor* editor, MouseMessage* msg)
|
||||
StatusBar::instance()->showTip(1000,
|
||||
"The background layer cannot be moved");
|
||||
}
|
||||
else if (!layer->isReadable()) {
|
||||
StatusBar::instance()->showTip(1000,
|
||||
"Layer '%s' is hidden", layer->name().c_str());
|
||||
}
|
||||
else if (!layer->isMoveable() || !layer->isWritable()) {
|
||||
StatusBar::instance()->showTip(1000,
|
||||
"Layer '%s' is locked", layer->name().c_str());
|
||||
|
@ -498,7 +498,7 @@ void Sprite::pickCels(int x, int y, FrameNumber frame, int opacityThreshold, Cel
|
||||
|
||||
for (int i=(int)layers.size()-1; i>=0; --i) {
|
||||
Layer* layer = layers[i];
|
||||
if (!layer->isImage())
|
||||
if (!layer->isImage() || !layer->isReadable())
|
||||
continue;
|
||||
|
||||
Cel* cel = static_cast<LayerImage*>(layer)->getCel(frame);
|
||||
|
Loading…
x
Reference in New Issue
Block a user