1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-03 17:19:43 +02:00

better fix for bug 307

This commit is contained in:
v.audacity 2013-07-26 07:34:17 +00:00
parent bbdb415a82
commit 953d31c8d3
2 changed files with 10 additions and 11 deletions

View File

@ -4691,17 +4691,6 @@ void AudacityProject::OnImport()
// this serves to track the file if the users zooms in and such.
wxGetApp().SetMissingAliasedFileWarningShouldShow(true);
// bug 307 fix:
// Apparently the shift key-up event gets swallowed by the file open dialog.
// The default shortcut for this command it Ctrl+Shift+I,
// so make sure the loop play button is reset.
if (GetControlToolBar())
{
wxKeyEvent dummyEvent;
dummyEvent.m_keyCode = WXK_SHIFT;
GetControlToolBar()->OnKeyUp(dummyEvent);
}
wxArrayString selectedFiles = ShowOpenDialog(wxT(""));
if (selectedFiles.GetCount() == 0) {
gPrefs->Write(wxT("/LastOpenType"),wxT(""));

View File

@ -936,6 +936,16 @@ void TrackPanel::OnTimer()
wxCommandEvent dummyEvent;
AudacityProject *p = GetProject();
// bug 307 fix:
// Apparently Shift key-up events get swallowed if a command with a Shift
// in its keyboard accelerator opens a dialog.
if (!wxGetKeyState(WXK_SHIFT) && p->GetControlToolBar())
{
wxKeyEvent dummyEvent;
dummyEvent.m_keyCode = WXK_SHIFT;
p->GetControlToolBar()->OnKeyUp(dummyEvent);
}
if ((p->GetAudioIOToken() > 0) &&
gAudioIO->IsStreamActive(p->GetAudioIOToken()))
{