1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 23:59:37 +02:00
This commit is contained in:
yam 2015-10-08 16:52:58 -05:00
parent 6b9541933d
commit c7792dd52f

View File

@ -3713,6 +3713,15 @@ void AudacityProject::AddImportedTracks(wxString fileName,
PushState(wxString::Format(_("Imported '%s'"), fileName.c_str()),
_("Import"));
#if defined(__WXGTK__)
// See bug #1224
// The track panel hasn't we been fully created, so the OnZoomFit() will not give
// expected results due to a window width of zero. Should be safe to yield here to
// allow the creattion to complete. If this becomes a problem, it "might" be possible
// to queue a dummy event to trigger the OnZoomFit().
wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI | wxEVT_CATEGORY_USER_INPUT);
#endif
OnZoomFit();
mTrackPanel->SetFocus();