From 1125cbb5a95dbd2d90236d7a5d24bd6f55321170 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Tue, 3 Jul 2007 01:09:39 +0000 Subject: [PATCH] Fixed two crashes Originally committed to SVN as r1336. --- aegisub/audio_display.cpp | 2 +- aegisub/frame_main.cpp | 1 + aegisub/main.cpp | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/aegisub/audio_display.cpp b/aegisub/audio_display.cpp index f505bcd01..fb6b7b6ec 100644 --- a/aegisub/audio_display.cpp +++ b/aegisub/audio_display.cpp @@ -2095,7 +2095,7 @@ void AudioDisplay::ChangeLine(int delta) { int next = line_n+delta; if (next == -1) next = 0; if (next == grid->GetRows()) next = grid->GetRows() - 1; - wxLogDebug(_T("AudioDisplay::ChangeLine: next=%s"), next); + wxLogDebug(_T("AudioDisplay::ChangeLine: next=%i"), next); // Set stuff NeedCommit = false; diff --git a/aegisub/frame_main.cpp b/aegisub/frame_main.cpp index be15f5c9d..7c996b843 100644 --- a/aegisub/frame_main.cpp +++ b/aegisub/frame_main.cpp @@ -500,6 +500,7 @@ void FrameMain::InitContents() { // Set display SetDisplayMode(0,0); Layout(); + EditBox->TextEdit->SetFocus(); } diff --git a/aegisub/main.cpp b/aegisub/main.cpp index 000345492..7c9b9ab01 100644 --- a/aegisub/main.cpp +++ b/aegisub/main.cpp @@ -371,7 +371,8 @@ void AegisubApp::OnMouseWheel(wxMouseEvent &event) { wxPoint pt; wxWindow *target = wxFindWindowAtPointer(pt); if (target == frame->audioBox->audioDisplay || target == frame->SubsBox) { - target->AddPendingEvent(event); + if (target->IsShownOnScreen()) target->AddPendingEvent(event); + else event.Skip(); } else event.Skip(); }