[aseprite] 80/134: Fix issue #548 - Avoid moving hidden layers or auto-selecting them

Tobias Hansen thansen at moszumanska.debian.org
Sat Mar 14 17:10:09 UTC 2015


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit aee7eb7bd4a85946f2e44bdfa23173481d7ebae5
Author: David Capello <davidcapello at gmail.com>
Date:   Sun Nov 30 09:43:33 2014 -0300

    Fix issue #548 - Avoid moving hidden layers or auto-selecting them
---
 src/app/ui/editor/standby_state.cpp | 4 ++++
 src/raster/sprite.cpp               | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/app/ui/editor/standby_state.cpp b/src/app/ui/editor/standby_state.cpp
index 177639a..fbb631a 100644
--- a/src/app/ui/editor/standby_state.cpp
+++ b/src/app/ui/editor/standby_state.cpp
@@ -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());
diff --git a/src/raster/sprite.cpp b/src/raster/sprite.cpp
index 1413853..017ec35 100644
--- a/src/raster/sprite.cpp
+++ b/src/raster/sprite.cpp
@@ -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);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list