Set the correct combo index for display purposes
This commit is contained in:
parent
cfa1cd3d49
commit
0667b9d5ea
|
@ -197,6 +197,12 @@ void MainWindow::rebuildSinkCombo() {
|
|||
row[deviceColumns.index] = i->first;
|
||||
row[deviceColumns.name] = i->second->description.c_str();
|
||||
}
|
||||
|
||||
/* Force a redraw of the dropdown combo due to the model change. */
|
||||
for (std::map<uint32_t, SinkInputWidget*>::iterator i = sinkInputWidgets.begin(); i != sinkInputWidgets.end(); ++i) {
|
||||
SinkInputWidget* w = i->second;
|
||||
w->setSinkIndex(w->sinkIndex());
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::updateSink(const pa_sink_info &info) {
|
||||
|
@ -364,6 +370,12 @@ void MainWindow::rebuildSourceCombo() {
|
|||
row[deviceColumns.index] = i->first;
|
||||
row[deviceColumns.name] = i->second->description.c_str();
|
||||
}
|
||||
|
||||
/* Force a redraw of the dropdown combo due to the model change. */
|
||||
for (std::map<uint32_t, SourceOutputWidget*>::iterator i = sourceOutputWidgets.begin(); i != sourceOutputWidgets.end(); ++i) {
|
||||
SourceOutputWidget* w = i->second;
|
||||
w->setSourceIndex(w->sourceIndex());
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::updateSource(const pa_source_info &info) {
|
||||
|
|
|
@ -61,6 +61,7 @@ SinkInputWidget* SinkInputWidget::create(MainWindow* mainWindow) {
|
|||
|
||||
void SinkInputWidget::setSinkIndex(uint32_t idx) {
|
||||
mSinkIndex = idx;
|
||||
deviceCombo->set_active(mpMainWindow->sinkTreeIndexes[idx]);
|
||||
}
|
||||
|
||||
uint32_t SinkInputWidget::sinkIndex() {
|
||||
|
|
|
@ -61,6 +61,7 @@ SourceOutputWidget* SourceOutputWidget::create(MainWindow* mainWindow) {
|
|||
|
||||
void SourceOutputWidget::setSourceIndex(uint32_t idx) {
|
||||
mSourceIndex = idx;
|
||||
deviceCombo->set_active(mpMainWindow->sourceTreeIndexes[idx]);
|
||||
}
|
||||
|
||||
uint32_t SourceOutputWidget::sourceIndex() {
|
||||
|
|
Loading…
Reference in New Issue