Skip to content

Commit

Permalink
Fix target buttons (fix #1698)
Browse files Browse the repository at this point in the history
  • Loading branch information
dacap committed Apr 3, 2018
1 parent 1571fac commit 4c287a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/commands/filters/filter_target_buttons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ void FilterTargetButtons::updateComponentTooltip(Item* item, const char* channel
void FilterTargetButtons::onItemChange(Item* item)
{
ButtonSet::onItemChange(item);
Target target = m_target;
CelsTarget celsTarget = m_celsTarget;

if (m_index && item && item->isSelected()) {
if (item == m_index) {
Expand All @@ -142,13 +140,15 @@ void FilterTargetButtons::onItemChange(Item* item)
}
}

Target target = 0;
if (m_red && m_red->isSelected()) target |= TARGET_RED_CHANNEL;
if (m_green && m_green->isSelected()) target |= TARGET_GREEN_CHANNEL;
if (m_blue && m_blue->isSelected()) target |= TARGET_BLUE_CHANNEL;
if (m_gray && m_gray->isSelected()) target |= TARGET_GRAY_CHANNEL;
if (m_index && m_index->isSelected()) target |= TARGET_INDEX_CHANNEL;
if (m_alpha && m_alpha->isSelected()) target |= TARGET_ALPHA_CHANNEL;

CelsTarget celsTarget = m_celsTarget;
if (m_cels->isSelected()) {
m_cels->setSelected(false);
celsTarget = // Switch cels target
Expand Down

0 comments on commit 4c287a7

Please sign in to comment.