Delay loading files specified on the commandline until the main window has been created, layouted and shown. This should solve glitches occurring due to any window layout changes from things being loaded. Fixes #1357.

Originally committed to SVN as r5986.
This commit is contained in:
Niels Martin Hansen 2011-12-06 22:14:43 +00:00
parent f7af745f75
commit 0777d3b136
1 changed files with 5 additions and 2 deletions

View File

@ -180,8 +180,6 @@ FrameMain::FrameMain (wxArrayString args)
// Parse arguments
StartupLog(_T("Initialize empty file"));
LoadSubtitles(_T(""));
StartupLog(_T("Load files specified on command line"));
LoadList(args);
// Version checker
// Fails on non-Windows platforms with a crash
@ -201,6 +199,11 @@ FrameMain::FrameMain (wxArrayString args)
SetDisplayMode(-1, -1);
Thaw();
// do this after creating and showing the window to ensure layout is done properly
// see bug #1357
StartupLog(_T("Load files specified on command line"));
LoadList(args);
//ShowFullScreen(true,wxFULLSCREEN_NOBORDER | wxFULLSCREEN_NOCAPTION);
StartupLog(_T("Leaving FrameMain constructor"));
}