Skip to content

Commit d34cf0a

Browse files
committed
- When selecting an Aux-Send pseudo-plugin, also highlight the
respective target output bus mixer strip. (FIXED)
1 parent 8cd35d1 commit d34cf0a

16 files changed

+405
-389
lines changed

src/qtractorMixer.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,8 +1803,7 @@ void qtractorMixer::setSelectedOutputBus ( qtractorBus *pOutputBus )
18031803
if (pOutputBus && (pOutputBus->busMode() & qtractorBus::Output))
18041804
pOutputStrip2 = m_pOutputRack->findStrip(pOutputBus->monitor_out());
18051805

1806-
if (pOutputStrip2)
1807-
m_pOutputRack->setSelectedStrip2(pOutputStrip2);
1806+
m_pOutputRack->setSelectedStrip2(pOutputStrip2);
18081807
}
18091808

18101809

src/qtractorPlugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ void qtractorPlugin::updateFormDirtyCount (void)
731731
}
732732

733733

734-
void qtractorPlugin::updateMidiControlAutoConnect (void)
734+
void qtractorPlugin::updateFormMidiControlAutoConnect (void)
735735
{
736736
if (m_pForm)
737737
m_pForm->updateMidiControlAutoConnect();

src/qtractorPlugin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ class qtractorPlugin : public qtractorList<qtractorPlugin>::Link
471471

472472
void toggleFormEditor(bool bOn);
473473
void updateFormDirtyCount();
474-
void updateMidiControlAutoConnect();
474+
void updateFormMidiControlAutoConnect();
475475
void updateFormAuxSendBusName();
476476
void updateFormActivated();
477477
void refreshForm();

src/qtractorPluginCommand.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ bool qtractorAuxSendPluginCommand::redo (void)
235235
const QString sAudioBusName = pAudioAuxSendPlugin->audioBusName();
236236
pAudioAuxSendPlugin->setAudioBusName(m_sAuxSendBusName, true);
237237
m_sAuxSendBusName = sAudioBusName;
238-
pAudioAuxSendPlugin->updateFormAuxSendBusName();
239238
} else {
240239
qtractorMidiAuxSendPlugin *pMidiAuxSendPlugin
241240
= static_cast<qtractorMidiAuxSendPlugin *> (pPlugin);
@@ -244,9 +243,10 @@ bool qtractorAuxSendPluginCommand::redo (void)
244243
const QString sMidiBusName = pMidiAuxSendPlugin->midiBusName();
245244
pMidiAuxSendPlugin->setMidiBusName(m_sAuxSendBusName);
246245
m_sAuxSendBusName = sMidiBusName;
247-
pMidiAuxSendPlugin->updateFormAuxSendBusName();
248246
}
249247

248+
pPlugin->updateFormAuxSendBusName();
249+
250250
return true;
251251
}
252252

src/qtractorPluginForm.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,6 +1049,8 @@ void qtractorPluginForm::changeAuxSendBusNameSlot ( int iAuxSendBusName )
10491049

10501050
pSession->execute(
10511051
new qtractorAuxSendPluginCommand(m_pPlugin, sAuxSendBusName));
1052+
1053+
qtractorPluginListView::updateAuxSendPluginBus(m_pPlugin);
10521054
}
10531055

10541056

src/qtractorPluginListView.cpp

Lines changed: 43 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,8 @@ qtractorPluginListView::qtractorPluginListView ( QWidget *pParent )
308308
SIGNAL(itemDoubleClicked(QListWidgetItem*)),
309309
SLOT(itemDoubleClickedSlot(QListWidgetItem*)));
310310
QObject::connect(this,
311-
SIGNAL(itemActivated(QListWidgetItem*)),
312-
SLOT(itemActivatedSlot(QListWidgetItem*)));
311+
SIGNAL(itemClicked(QListWidgetItem*)),
312+
SLOT(itemClickedSlot(QListWidgetItem*)));
313313
}
314314

315315

@@ -1262,6 +1262,44 @@ void qtractorPluginListView::insertPluginBus (
12621262
}
12631263

12641264

1265+
// Show selected Aux-Send bus on the mixer outputs pane. [static]
1266+
void qtractorPluginListView::updateAuxSendPluginBus (
1267+
qtractorPlugin *pPlugin )
1268+
{
1269+
if (pPlugin == nullptr)
1270+
return;
1271+
1272+
qtractorPluginType *pType = pPlugin->type();
1273+
if (pType == nullptr)
1274+
return;
1275+
1276+
if (pType->typeHint() != qtractorPluginType::AuxSend)
1277+
return;
1278+
1279+
qtractorMainForm *pMainForm = qtractorMainForm::getInstance();
1280+
if (pMainForm == nullptr)
1281+
return;
1282+
1283+
qtractorMixer *pMixer = pMainForm->mixer();
1284+
if (pMixer == nullptr)
1285+
return;
1286+
1287+
if (pType->index() > 0) { // index == channels > 0 => Audio aux-send.
1288+
qtractorAudioAuxSendPlugin *pAudioAuxSendPlugin
1289+
= static_cast<qtractorAudioAuxSendPlugin *> (pPlugin);
1290+
if (pAudioAuxSendPlugin)
1291+
pMixer->setSelectedOutputBus(pAudioAuxSendPlugin->audioBus());
1292+
1293+
} else {
1294+
qtractorMidiAuxSendPlugin *pMidiAuxSendPlugin
1295+
= static_cast<qtractorMidiAuxSendPlugin *> (pPlugin);
1296+
if (pMidiAuxSendPlugin)
1297+
pMixer->setSelectedOutputBus(pMidiAuxSendPlugin->midiBus());
1298+
}
1299+
}
1300+
1301+
1302+
12651303
// Audio specific slots.
12661304
void qtractorPluginListView::audioOutputs (void)
12671305
{
@@ -1370,7 +1408,7 @@ void qtractorPluginListView::midiControlAutoConnect (void)
13701408
if (pMidiControlPlugin) {
13711409
pMidiControlPlugin->setControlAutoConnect(
13721410
!pMidiControlPlugin->isControlAutoConnect()); // Toggle!
1373-
pMidiControlPlugin->updateMidiControlAutoConnect();
1411+
pMidiControlPlugin->updateFormMidiControlAutoConnect();
13741412
}
13751413
}
13761414
}
@@ -1408,7 +1446,7 @@ void qtractorPluginListView::itemDoubleClickedSlot ( QListWidgetItem *item )
14081446

14091447

14101448
// Simple-click handler.
1411-
void qtractorPluginListView::itemActivatedSlot ( QListWidgetItem *item )
1449+
void qtractorPluginListView::itemClickedSlot ( QListWidgetItem *item )
14121450
{
14131451
if (m_pPluginList == nullptr)
14141452
return;
@@ -1422,33 +1460,7 @@ void qtractorPluginListView::itemActivatedSlot ( QListWidgetItem *item )
14221460
if (pPlugin == nullptr)
14231461
return;
14241462

1425-
qtractorPluginType *pType = pPlugin->type();
1426-
if (pType == nullptr)
1427-
return;
1428-
1429-
if (pType->typeHint() != qtractorPluginType::AuxSend)
1430-
return;
1431-
1432-
qtractorMainForm *pMainForm = qtractorMainForm::getInstance();
1433-
if (pMainForm == nullptr)
1434-
return;
1435-
1436-
qtractorMixer *pMixer = pMainForm->mixer();
1437-
if (pMixer == nullptr)
1438-
return;
1439-
1440-
if (pType->index() > 0) { // index == channels > 0 => Audio aux-send.
1441-
qtractorAudioAuxSendPlugin *pAudioAuxSendPlugin
1442-
= static_cast<qtractorAudioAuxSendPlugin *> (pPlugin);
1443-
if (pAudioAuxSendPlugin)
1444-
pMixer->setSelectedOutputBus(pAudioAuxSendPlugin->audioBus());
1445-
1446-
} else {
1447-
qtractorMidiAuxSendPlugin *pMidiAuxSendPlugin
1448-
= static_cast<qtractorMidiAuxSendPlugin *> (pPlugin);
1449-
if (pMidiAuxSendPlugin)
1450-
pMixer->setSelectedOutputBus(pMidiAuxSendPlugin->midiBus());
1451-
}
1463+
updateAuxSendPluginBus(pPlugin);
14521464
}
14531465

14541466

src/qtractorPluginListView.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ class qtractorPluginListView : public QListWidget
118118
// Show insert pseudo-plugin audio bus connections.
119119
static void insertPluginBus(qtractorPlugin *pPlugin, int iBusMode);
120120

121+
// Show selected Aux-Send bus on the mixer outputs pane.
122+
static void updateAuxSendPluginBus(qtractorPlugin *pPlugin);
123+
121124
signals:
122125

123126
// Plugin chain changed somehow.
@@ -177,7 +180,7 @@ protected slots:
177180

178181
// Double/simple-click handler.
179182
void itemDoubleClickedSlot(QListWidgetItem *);
180-
void itemActivatedSlot(QListWidgetItem *);
183+
void itemClickedSlot(QListWidgetItem *);
181184

182185
protected:
183186

0 commit comments

Comments
 (0)