Mercurial > hg > svgui
comparison view/ViewProxy.h @ 1329:344f29e46258 zoom
Responding to a hang due to mismatching zoom and block sizes
author | Chris Cannam |
---|---|
date | Thu, 20 Sep 2018 15:42:12 +0100 |
parents | 97c68bffbda6 |
children | 28075cc658c9 |
comparison
equal
deleted
inserted
replaced
1328:b39cd8fb309f | 1329:344f29e46258 |
---|---|
76 return m_view->getValueExtents(unit, min, max, log); | 76 return m_view->getValueExtents(unit, min, max, log); |
77 } | 77 } |
78 virtual ZoomLevel getZoomLevel() const { | 78 virtual ZoomLevel getZoomLevel() const { |
79 ZoomLevel z = m_view->getZoomLevel(); | 79 ZoomLevel z = m_view->getZoomLevel(); |
80 //!!! | 80 //!!! |
81 cerr << "getZoomLevel: from " << z << " to "; | 81 // cerr << "getZoomLevel: from " << z << " to "; |
82 if (z.zone == ZoomLevel::FramesPerPixel) { | 82 if (z.zone == ZoomLevel::FramesPerPixel) { |
83 z.level /= m_scaleFactor; | 83 z.level /= m_scaleFactor; |
84 if (z.level < 1) { | 84 if (z.level < 1) { |
85 z.level = 1; | 85 z.level = 1; |
86 } | 86 } |
87 } else { | 87 } else { |
88 //!!!??? | 88 //!!!??? |
89 z.level *= m_scaleFactor; | 89 z.level *= m_scaleFactor; |
90 } | 90 } |
91 cerr << z << endl; | 91 // cerr << z << endl; |
92 return z; | 92 return z; |
93 } | 93 } |
94 virtual QRect getPaintRect() const { | 94 virtual QRect getPaintRect() const { |
95 QRect r = m_view->getPaintRect(); | 95 QRect r = m_view->getPaintRect(); |
96 return QRect(r.x() * m_scaleFactor, | 96 return QRect(r.x() * m_scaleFactor, |