From 7c6d773b74eec9cc55ffb43edeb6a585226ceac1 Mon Sep 17 00:00:00 2001 From: Michael Gregorius Date: Fri, 10 May 2024 18:34:53 +0200 Subject: [PATCH] Use LmmsComboBox in Microtuner config Replace the `ComboBox` that was used in `MicrotunerConfig` with an `LmmsComboBox`. This disables the automation of these boxes which led to crashes. --- src/gui/MicrotunerConfig.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/gui/MicrotunerConfig.cpp b/src/gui/MicrotunerConfig.cpp index 6bb8415bd45..6efa6a23892 100644 --- a/src/gui/MicrotunerConfig.cpp +++ b/src/gui/MicrotunerConfig.cpp @@ -34,7 +34,7 @@ #include #include -#include "ComboBox.h" +#include "LmmsComboBox.h" #include "embed.h" #include "Engine.h" #include "FileDialog.h" @@ -91,8 +91,7 @@ MicrotunerConfig::MicrotunerConfig() : { m_scaleComboModel.addItem(QString::number(i) + ": " + Engine::getSong()->getScale(i)->getDescription()); } - auto scaleCombo = new ComboBox(); - scaleCombo->setModel(&m_scaleComboModel); + auto scaleCombo = new LmmsComboBox(this, &m_scaleComboModel); microtunerLayout->addWidget(scaleCombo, 1, 0, 1, 2); connect(&m_scaleComboModel, &ComboBoxModel::dataChanged, [=] {updateScaleForm();}); @@ -129,8 +128,7 @@ MicrotunerConfig::MicrotunerConfig() : { m_keymapComboModel.addItem(QString::number(i) + ": " + Engine::getSong()->getKeymap(i)->getDescription()); } - auto keymapCombo = new ComboBox(); - keymapCombo->setModel(&m_keymapComboModel); + auto keymapCombo = new LmmsComboBox(this, &m_keymapComboModel); microtunerLayout->addWidget(keymapCombo, 1, 2, 1, 2); connect(&m_keymapComboModel, &ComboBoxModel::dataChanged, [=] {updateKeymapForm();});