mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-01 08:29:27 +02:00
Fix for bug #1224
This commit is contained in:
parent
6b9541933d
commit
c7792dd52f
@ -3713,6 +3713,15 @@ void AudacityProject::AddImportedTracks(wxString fileName,
|
|||||||
PushState(wxString::Format(_("Imported '%s'"), fileName.c_str()),
|
PushState(wxString::Format(_("Imported '%s'"), fileName.c_str()),
|
||||||
_("Import"));
|
_("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();
|
OnZoomFit();
|
||||||
|
|
||||||
mTrackPanel->SetFocus();
|
mTrackPanel->SetFocus();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user