##// END OF EJS Templates
Fix zooming...
Titta Heikkala -
r2728:2e341eff31af
parent child
Show More
@@ -75,6 +75,15 void XYDomain::zoomIn(const QRectF &rect)
75 minY = maxY - dy * rect.bottom();
75 minY = maxY - dy * rect.bottom();
76 maxY = maxY - dy * rect.top();
76 maxY = maxY - dy * rect.top();
77
77
78 if ((maxX - minX) == spanX()) {
79 minX = m_minX;
80 maxX = m_maxX;
81 }
82 if ((maxY - minY) == spanY()) {
83 minY = m_minY;
84 maxY = m_maxY;
85 }
86
78 setRange(minX, maxX, minY, maxY);
87 setRange(minX, maxX, minY, maxY);
79 }
88 }
80
89
@@ -94,6 +103,15 void XYDomain::zoomOut(const QRectF &rect)
94 maxY = minY + dy * rect.bottom();
103 maxY = minY + dy * rect.bottom();
95 minY = maxY - dy * m_size.height();
104 minY = maxY - dy * m_size.height();
96
105
106 if ((maxX - minX) == spanX()) {
107 minX = m_minX;
108 maxX = m_maxX;
109 }
110 if ((maxY - minY) == spanY()) {
111 minY = m_minY;
112 maxY = m_maxY;
113 }
114
97 setRange(minX, maxX, minY, maxY);
115 setRange(minX, maxX, minY, maxY);
98 }
116 }
99
117
General Comments 0
You need to be logged in to leave comments. Login now