@@ -75,6 +75,15 void XYDomain::zoomIn(const QRectF &rect) | |||
|
75 | 75 | minY = maxY - dy * rect.bottom(); |
|
76 | 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 | 87 | setRange(minX, maxX, minY, maxY); |
|
79 | 88 | } |
|
80 | 89 | |
@@ -94,6 +103,15 void XYDomain::zoomOut(const QRectF &rect) | |||
|
94 | 103 | maxY = minY + dy * rect.bottom(); |
|
95 | 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 | 115 | setRange(minX, maxX, minY, maxY); |
|
98 | 116 | } |
|
99 | 117 |
General Comments 0
You need to be logged in to leave comments.
Login now