From feb77217c7fe23a901d2ca0b370efdfe07ae75f2 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Tue, 17 Nov 2009 01:37:18 +0000 Subject: [PATCH] Fix bug where detaching loaded but hidden video had broken results. Originally committed to SVN as r3798. --- aegisub/src/frame_main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/aegisub/src/frame_main.cpp b/aegisub/src/frame_main.cpp index af647e68a..e065c92d3 100644 --- a/aegisub/src/frame_main.cpp +++ b/aegisub/src/frame_main.cpp @@ -631,8 +631,6 @@ void FrameMain::InitContents() { //SetSizer(MainSizer); // Set display - StartupLog(_T("Set display mode")); - SetDisplayMode(0,0); StartupLog(_T("Perform layout")); Layout(); StartupLog(_T("Set focus to edting box")); @@ -894,7 +892,7 @@ void FrameMain::SetDisplayMode(int video, int audio) { MainSizer->Layout(); Layout(); Show(true); - VideoContext::Get()->UpdateDisplays(true); + if (showVideo) VideoContext::Get()->UpdateDisplays(true); Thaw(); } @@ -1286,6 +1284,7 @@ void FrameMain::DetachVideo(bool detach) { if (!detachedVideo) { detachedVideo = new DialogDetachedVideo(this, videoBox->videoDisplay->GetClientSize()); detachedVideo->Show(); + VideoContext::Get()->UpdateDisplays(true); } } else if (detachedVideo) {