From 26d18dc248cbd3ebe4480bd551631ce0ca539908 Mon Sep 17 00:00:00 2001 From: mchinen Date: Wed, 12 Jan 2011 19:49:43 +0000 Subject: [PATCH] bug 11 followup: DeviceToolbar.cpp: fix num channels redraw - was causing some platforms to display the wxChoice combo box incorrectly --- src/toolbars/DeviceToolBar.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/toolbars/DeviceToolBar.cpp b/src/toolbars/DeviceToolBar.cpp index 6f60cda9e..43ac50b82 100644 --- a/src/toolbars/DeviceToolBar.cpp +++ b/src/toolbars/DeviceToolBar.cpp @@ -573,6 +573,13 @@ void DeviceToolBar::FillInputChannels() } if (index == -1) mInputChannels->Enable(false); + + // Resize if necessary + mInputChannels->SetSize(mInputChannels->GetEffectiveMinSize()); + + Layout(); + this->Refresh(); + Update(); } void DeviceToolBar::SetDevices(DeviceSourceMap *in, DeviceSourceMap *out) { @@ -580,7 +587,7 @@ void DeviceToolBar::SetDevices(DeviceSourceMap *in, DeviceSourceMap *out) gPrefs->Write(wxT("/AudioIO/RecordingDevice"), in->deviceString); gPrefs->Write(wxT("/AudioIO/RecordingSourceIndex"), in->sourceIndex); if (in->sourceIndex >= 0) { - gPrefs->Write(wxT("/AudioIO/RecordingSource"),in->sourceString); + gPrefs->Write(wxT("/AudioIO/RecordingSource"), in->sourceString); } else gPrefs->Write(wxT("/AudioIO/RecordingSource"), wxT("")); FillInputChannels(); @@ -591,7 +598,7 @@ void DeviceToolBar::SetDevices(DeviceSourceMap *in, DeviceSourceMap *out) if (out->sourceIndex >= 0) { gPrefs->Write(wxT("/AudioIO/PlaybackSource"), out->sourceString); } else - gPrefs->Write(wxT("/AudioIO/RecordingSource"), wxT("")); + gPrefs->Write(wxT("/AudioIO/PlaybackSource"), wxT("")); } }