mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-17 09:07:41 +02:00
DeviceToolbar.cpp: use OnChoice instead of obfuscated ProcessCommand for combobox modal dialog
This commit is contained in:
parent
0254283598
commit
3f4b5f7779
@ -20,7 +20,6 @@
|
|||||||
#include <wx/wxprec.h>
|
#include <wx/wxprec.h>
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <wx/control.h>
|
|
||||||
#include <wx/choice.h>
|
#include <wx/choice.h>
|
||||||
#include <wx/event.h>
|
#include <wx/event.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
@ -862,10 +861,10 @@ void DeviceToolBar::ShowComboDialog(wxChoice *combo, const wxString &title)
|
|||||||
|
|
||||||
if (dlg.ShowModal() == wxID_OK)
|
if (dlg.ShowModal() == wxID_OK)
|
||||||
{
|
{
|
||||||
wxCommandEvent e(wxEVT_COMMAND_CHOICE_SELECTED, dlg.GetId());
|
wxCommandEvent dummyEvent;
|
||||||
|
// SetSelection() doesn't send an event, so we call OnChoice explicitly
|
||||||
combo->SetSelection(c->GetSelection());
|
combo->SetSelection(c->GetSelection());
|
||||||
// This will fire an event which will invoke OnChoice above.
|
OnChoice(dummyEvent);
|
||||||
combo->ProcessCommand(e);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user