mirror of https://github.com/odrling/Aegisub
Don't try to set the zoom dropdown selection if it'd be out of bounds
Originally committed to SVN as r6928.
This commit is contained in:
parent
2fb6b19e45
commit
3dc9e4fbea
|
@ -377,7 +377,9 @@ void VideoDisplay::OnKeyDown(wxKeyEvent &event) {
|
|||
|
||||
void VideoDisplay::SetZoom(double value) {
|
||||
zoomValue = std::max(value, .125);
|
||||
zoomBox->SetSelection(value / .125 - 1);
|
||||
size_t selIndex = value / .125 - 1;
|
||||
if (selIndex < zoomBox->GetCount())
|
||||
zoomBox->SetSelection(selIndex);
|
||||
zoomBox->ChangeValue(wxString::Format("%g%%", zoomValue * 100.));
|
||||
UpdateSize();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue