[aseprite] 07/250: Don't reset TARGET_ALL_FRAMES/LAYERS flags in FilterTargetButtons::setTarget()
Tobias Hansen
thansen at moszumanska.debian.org
Sun Dec 20 15:26:59 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 465a0c1d14af58489f75f122171b47fc92dd3b31
Author: David Capello <davidcapello at gmail.com>
Date: Fri Aug 28 15:34:47 2015 -0300
Don't reset TARGET_ALL_FRAMES/LAYERS flags in FilterTargetButtons::setTarget()
---
src/app/commands/filters/filter_target_buttons.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/commands/filters/filter_target_buttons.cpp b/src/app/commands/filters/filter_target_buttons.cpp
index 07eebc0..0060b30 100644
--- a/src/app/commands/filters/filter_target_buttons.cpp
+++ b/src/app/commands/filters/filter_target_buttons.cpp
@@ -72,7 +72,8 @@ FilterTargetButtons::FilterTargetButtons(int imgtype, bool withChannels)
void FilterTargetButtons::setTarget(int target)
{
- m_target = target;
+ m_target &= (TARGET_ALL_FRAMES | TARGET_ALL_LAYERS);
+ m_target |= (target & ~(TARGET_ALL_FRAMES | TARGET_ALL_LAYERS));
selectTargetButton(m_red, TARGET_RED_CHANNEL);
selectTargetButton(m_green, TARGET_GREEN_CHANNEL);
@@ -134,7 +135,7 @@ void FilterTargetButtons::updateComponentTooltip(Item* item, const char* channel
void FilterTargetButtons::onItemChange()
{
ButtonSet::onItemChange();
- Target flags = 0;
+ Target flags = (m_target & (TARGET_ALL_FRAMES | TARGET_ALL_LAYERS));
if (m_red && m_red->isSelected()) flags |= TARGET_RED_CHANNEL;
if (m_green && m_green->isSelected()) flags |= TARGET_GREEN_CHANNEL;
@@ -147,7 +148,6 @@ void FilterTargetButtons::onItemChange()
m_cels->setSelected(false);
// Rotate cels target
- flags |= (m_target & (TARGET_ALL_FRAMES | TARGET_ALL_LAYERS));
if (flags & TARGET_ALL_FRAMES) {
flags &= ~TARGET_ALL_FRAMES;
--
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