the end of fantastic voyage (#2103)

This commit is contained in:
shun-iwasawa 2018-06-26 14:58:50 +09:00 committed by masafumi-inoue
parent 25d3db05fd
commit 7a435f47d1

View file

@ -635,9 +635,10 @@ void ImageViewer::panQt(const QPoint &delta) {
void ImageViewer::zoomQt(const QPoint &center, double factor) {
if (factor == 1.0) return;
TPointD delta(center.x(), center.y());
setViewAff(TTranslation(delta) * TScale(factor) * TTranslation(-delta) *
m_viewAff);
double scale2 = fabs(m_viewAff.det());
if ((scale2 < 100000 || factor < 1) && (scale2 > 0.001 * 0.05 || factor > 1))
setViewAff(TTranslation(delta) * TScale(factor) * TTranslation(-delta) *
m_viewAff);
update();
}