Fixed two crashes

Originally committed to SVN as r1336.
This commit is contained in:
Rodrigo Braz Monteiro 2007-07-03 01:09:39 +00:00
parent 16786725c3
commit 1125cbb5a9
3 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -500,6 +500,7 @@ void FrameMain::InitContents() {
// Set display
SetDisplayMode(0,0);
Layout();
EditBox->TextEdit->SetFocus();
}

View File

@ -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();
}