diff --git a/samplewidget.cpp b/samplewidget.cpp index 1f60203..6efe5e7 100755 --- a/samplewidget.cpp +++ b/samplewidget.cpp @@ -185,6 +185,7 @@ void SampleWidget::learn(quint8 channel, quint8 note) void SampleWidget::unsendColor() { + m_sendColors = false; midi::MidiMessage midiMsg; midiMsg.channel = m_ui->channelSpinBox->value(); @@ -198,6 +199,7 @@ void SampleWidget::unsendColor() void SampleWidget::sendColor() { + m_sendColors = true; midi::MidiMessage midiMsg; midiMsg.channel = m_ui->channelSpinBox->value(); @@ -262,7 +264,8 @@ void SampleWidget::updateStatus() } setPalette(pal); - sendColor(); + if (m_sendColors) + sendColor(); if (m_reply) { diff --git a/samplewidget.h b/samplewidget.h index a638f06..2f7a69a 100755 --- a/samplewidget.h +++ b/samplewidget.h @@ -95,4 +95,6 @@ private: bool m_learning{}; QColor m_oldColor; QBrush m_oldBrush; + + bool m_sendColors{}; };