From 8c805c03dd19fac759af1325ea30c8f0e0d79654 Mon Sep 17 00:00:00 2001 From: mchinen Date: Sat, 12 Feb 2011 18:25:06 +0000 Subject: [PATCH] DeviceToolBar.cpp: better redraw on change host. Also fixes an issue where the combo boxes on other project's device toolbars wouldn't resize when the active projects device toolbar changed the host. --- src/toolbars/DeviceToolBar.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/toolbars/DeviceToolBar.cpp b/src/toolbars/DeviceToolBar.cpp index c26656a1d..f07a3eb07 100644 --- a/src/toolbars/DeviceToolBar.cpp +++ b/src/toolbars/DeviceToolBar.cpp @@ -482,6 +482,9 @@ void DeviceToolBar::UpdatePrefs() // Give base class a chance ToolBar::UpdatePrefs(); + + Layout(); + Refresh(); } @@ -704,10 +707,7 @@ int DeviceToolBar::ChangeHost() gPrefs->Write(wxT("/AudioIO/Host"), newHost); // populate the devices FillHostDevices(); - // make the device display selection reflect the prefs if they exist - UpdatePrefs(); - Refresh(); - Layout(); + return 1; } @@ -850,7 +850,7 @@ void DeviceToolBar::OnChoice(wxCommandEvent &event) gAudioIO->HandleDeviceChange(); } - // Update the other project's DeviceToolBar. + // Update all projects' DeviceToolBar. for (size_t i = 0; i < gAudacityProjects.GetCount(); i++) { gAudacityProjects[i]->GetDeviceToolBar()->UpdatePrefs(); }