Skip to content

Commit

Permalink
ui/simpledesk: improve the previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mcallegari committed Dec 29, 2024
1 parent eff23a3 commit 370437d
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion ui/src/simpledesk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,26 @@ void SimpleDesk::setAbsoluteChannelValue(uint address, uchar value)
void SimpleDesk::resetChannel(quint32 address)
{
m_engine->resetChannel(address);
slotUniversePageChanged(m_universePageSpin->value());

quint32 start = (m_universePageSpin->value() - 1) * m_channelsPerPage;

if (m_viewModeButton->isChecked() == false &&
address >= start && address < start + m_channelsPerPage)
{
Fixture *fxi = m_doc->fixture(m_doc->fixtureForAddress(address));
ConsoleChannel *cc = m_universeSliders[address - start];
if (fxi == NULL)
{
cc->setChannelStyleSheet(ssNone);
}
else
{
if (fxi->id() % 2)
cc->setChannelStyleSheet(ssEven);
else
cc->setChannelStyleSheet(ssOdd);
}
}
}

void SimpleDesk::resetUniverse()
Expand Down

0 comments on commit 370437d

Please sign in to comment.