From 6d6c0296082f0e8cda530c02c8c201f9ca2e46ba Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Sun, 18 Dec 2022 16:00:48 +0100 Subject: [PATCH] LEDs being renderd when drum pad tab is not active --- samplewidget.cpp | 5 ++++- samplewidget.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) 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{}; };