mirror of https://github.com/odrling/Aegisub
Respect min. zoom value when changing pan coords
This commit is contained in:
parent
d73dfe9c18
commit
70ddf3c7f5
|
@ -408,9 +408,10 @@ void VideoDisplay::ResetPan() {
|
||||||
|
|
||||||
void VideoDisplay::SetZoom(double value) {
|
void VideoDisplay::SetZoom(double value) {
|
||||||
if (value == 0) return;
|
if (value == 0) return;
|
||||||
|
value = std::max(value, .125);
|
||||||
pan_x *= value / zoomValue;
|
pan_x *= value / zoomValue;
|
||||||
pan_y *= value / zoomValue;
|
pan_y *= value / zoomValue;
|
||||||
zoomValue = std::max(value, .125);
|
zoomValue = value;
|
||||||
size_t selIndex = zoomValue / .125 - 1;
|
size_t selIndex = zoomValue / .125 - 1;
|
||||||
if (selIndex < zoomBox->GetCount())
|
if (selIndex < zoomBox->GetCount())
|
||||||
zoomBox->SetSelection(selIndex);
|
zoomBox->SetSelection(selIndex);
|
||||||
|
|
Loading…
Reference in New Issue