Respect min. zoom value when changing pan coords

This commit is contained in:
moex3 2020-11-25 19:49:28 +01:00 committed by Sodra
parent d73dfe9c18
commit 70ddf3c7f5

View file

@ -408,9 +408,10 @@ void VideoDisplay::ResetPan() {
void VideoDisplay::SetZoom(double value) {
if (value == 0) return;
value = std::max(value, .125);
pan_x *= value / zoomValue;
pan_y *= value / zoomValue;
zoomValue = std::max(value, .125);
zoomValue = value;
size_t selIndex = zoomValue / .125 - 1;
if (selIndex < zoomBox->GetCount())
zoomBox->SetSelection(selIndex);