From 0667b9d5eab0a6b96f57de1f6825472166901aed Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 16 Mar 2009 21:48:57 +0000 Subject: Set the correct combo index for display purposes --- src/mainwindow.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/mainwindow.cc') diff --git a/src/mainwindow.cc b/src/mainwindow.cc index ff1d690..a25e416 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -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::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::iterator i = sourceOutputWidgets.begin(); i != sourceOutputWidgets.end(); ++i) { + SourceOutputWidget* w = i->second; + w->setSourceIndex(w->sourceIndex()); + } } void MainWindow::updateSource(const pa_source_info &info) { -- cgit