Commit 379393a
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 zero. In that case, no reasonable monitor can be
identified anyway.1 parent 3e59697 commit 379393a
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