Change pan values with the zoom level changes

This commit is contained in:
moex3 2020-11-25 19:40:28 +01:00 committed by Sodra
parent 808ead65bf
commit d73dfe9c18
1 changed files with 2 additions and 0 deletions

View File

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