Skip to content

Commit

Permalink
Fixture Editor: allow to set a 1-range capability
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Oct 22, 2015
1 parent 374cdd5 commit 0319933
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fixtureeditor/editchannel.cpp
Expand Up @@ -308,7 +308,7 @@ void EditChannel::slotCapabilityListSelectionChanged(QTreeWidgetItem* item)
else
m_removeCapabilityButton->setEnabled(true);
}

#include <QDebug>
void EditChannel::slotAddCapabilityClicked()
{
uchar minFound = 0;
Expand All @@ -322,11 +322,13 @@ void EditChannel::slotAddCapabilityClicked()
maxFound = cap->min() - 1;
break;
}
if (cap->max() > minFound)
if (cap->max() > minFound || cap->min() == cap->max())
minFound = cap->max() + 1;
idx++;
}

qDebug() << "Min found:" << minFound << "max found:" << maxFound;

m_currentCapability = new QLCCapability();
m_currentCapability->setMin(minFound);
m_currentCapability->setMax(maxFound);
Expand Down

0 comments on commit 0319933

Please sign in to comment.