Fix cpn mix list highlight

This commit is contained in:
elecpower
2021-10-28 19:46:27 +10:00
committed by Peter Feerick
parent cd84f8665a
commit b4f0e7ca8e
+3 -6
View File
@@ -355,7 +355,7 @@ void MixesPanel::mixersDuplicate()
void MixesPanel::mixerOpen()
{
QListWidgetItem *item = mixersListWidget->currentItem();
if (item == nullptr)
if (item == nullptr)
return;
int idx = item->data(Qt::UserRole).toByteArray().at(0);
@@ -376,7 +376,7 @@ void MixesPanel::mixerOpen()
void MixesPanel::mixerHighlight()
{
QListWidgetItem *item = mixersListWidget->currentItem();
if (item == nullptr)
if (item == nullptr)
return;
int idx = item->data(Qt::UserRole).toByteArray().at(0);
@@ -389,10 +389,7 @@ void MixesPanel::mixerHighlight()
}
highlightedSource = ( (int)highlightedSource == dest) ? 0 : dest;
// qDebug() << "MixesPanel::mixerHighlight(): " << highlightedSource ;
for(int i=0; i<mixersListWidget->count(); i++) {
int t = mixersListWidget->item(i)->data(Qt::UserRole).toByteArray().at(0);
mixersListWidget->item(i)->setText(getMixerText(t, 0));
}
update();
}
void MixesPanel::mixerAdd()