Properly fix translation errors in viewer

Original fix was wrong, this sorts it out I think. Delta values had to
be doubled as we're in Clip space (I think) and the matrix
multiplication order had to be swapped around.

Updated one of the signla/slot pairs to be simpler as we no longer need
to pass the zoom percentage back and forth.
This commit is contained in:
Thomas Wilshaw
2020-06-16 16:57:38 +01:00
parent 100da912ad
commit 389f230050
5 changed files with 12 additions and 22 deletions
+2 -2
View File
@@ -105,7 +105,7 @@ void ViewerSizer::UpdateSize()
// This container is taller than the image, scale by width
child_size = QSize(width(), qRound(child_size.width() / aspect_ratio_));
}
emit SendZoomData(false, 0);
emit IsZoomed(false);
} else {
@@ -134,7 +134,7 @@ void ViewerSizer::UpdateSize()
child_matrix.scale(x_scale, y_scale, 1.0F);
child_size = QSize(zoomed_width, zoomed_height);
emit SendZoomData(zoomed_in, zoom_);
emit IsZoomed(zoomed_in);
}
widget_->resize(child_size);