From 2d5df24fd6c1d43574afd0e14c70b8bf3de80505 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Fri, 27 Jan 2012 19:23:16 +0000 Subject: [PATCH] Update the zoom on Enter in the zoom box. Updates #1433. Originally committed to SVN as r6378. --- aegisub/src/video_box.cpp | 2 +- aegisub/src/video_display.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/aegisub/src/video_box.cpp b/aegisub/src/video_box.cpp index 277c8152b..b8141cfde 100644 --- a/aegisub/src/video_box.cpp +++ b/aegisub/src/video_box.cpp @@ -103,7 +103,7 @@ VideoBox::VideoBox(wxWindow *parent, bool isDetached, agi::Context *context) for (int i = 1 ; i <= 24; ++i) { choices.Add(wxString::Format("%g%%", i * 12.5)); } - wxComboBox *zoomBox = new wxComboBox(this, -1, "75%", wxDefaultPosition, wxDefaultSize, choices, wxCB_DROPDOWN); + wxComboBox *zoomBox = new wxComboBox(this, -1, "75%", wxDefaultPosition, wxDefaultSize, choices, wxCB_DROPDOWN | wxTE_PROCESS_ENTER); // Typesetting buttons wxToolBar *visualToolBar = toolbar::GetToolbar(this, "visual_tools", context, "Video", true); diff --git a/aegisub/src/video_display.cpp b/aegisub/src/video_display.cpp index b0650e9f3..7d8645faf 100644 --- a/aegisub/src/video_display.cpp +++ b/aegisub/src/video_display.cpp @@ -110,6 +110,7 @@ VideoDisplay::VideoDisplay( { zoomBox->SetValue(wxString::Format("%g%%", zoomValue * 100.)); zoomBox->Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, &VideoDisplay::SetZoomFromBox, this); + zoomBox->Bind(wxEVT_COMMAND_TEXT_ENTER, &VideoDisplay::SetZoomFromBox, this); con->videoController->Bind(EVT_FRAME_READY, &VideoDisplay::UploadFrameData, this); slots.push_back(con->videoController->AddVideoOpenListener(&VideoDisplay::OnVideoOpen, this));