Commit 5a22b50
committed
[Win32] MultiZoomCoordinateSystemMapper: zero-sized rectangle handling
The MultiZoomCoordinateSystemMapper currently produces a devide-by-zero
error when transforming a rectangle of zero size. This can, for example,
happen when a (dummy) shell with width=height=0 is created and its
bounds are passed to the mapper.
This change ensures that the problematic calculation is avoided in case
width or height are zeroi by just taking the x/y coordinate into
account.1 parent 7c818d6 commit 5a22b50
File tree
2 files changed
+12
-0
lines changed- bundles/org.eclipse.swt
- Eclipse SWT Tests/win32/org/eclipse/swt/widgets
- Eclipse SWT/win32/org/eclipse/swt/widgets
2 files changed
+12
-0
lines changedLines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
213 | 222 | | |
214 | 223 | | |
215 | 224 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
195 | 198 | | |
196 | 199 | | |
197 | 200 | | |
| |||
0 commit comments