From 0777d3b136cef6915e7b8fdc05f81bce6bd64e99 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Tue, 6 Dec 2011 22:14:43 +0000 Subject: [PATCH] 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. --- aegisub/src/frame_main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aegisub/src/frame_main.cpp b/aegisub/src/frame_main.cpp index fdc428ccc..70d6b5fb6 100644 --- a/aegisub/src/frame_main.cpp +++ b/aegisub/src/frame_main.cpp @@ -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")); }