Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: UDIG 1.2.RC2
-
Fix Version/s: UDIG 1.2.0
-
Component/s: framework
-
Labels:None
-
Environment:Observed on Ubuntu 9.10 32 bit, but OS-independent
Description
RenderContextImpl throws exception when using a MapViewer and (indirectly) calling refesh on the render manager. This only happens when the control (UI) on which the renderer renders has zero dimensions (as it is the case when it hasn't being shown yet).
The fix is something like check for illegal dimensions before returning the image.
/**
- Provide a BufferedImage of the correct size for the map display.
* - @return BufferedImage for use by the Renderer
*/
public BufferedImage getImage() {
if (getImageSize().width < 1 || getImageSize().height < 1)
{ return dummyImage; } return getImage(getImageSize().width, getImageSize().height);
}
Something similar is done in getImage(int,int)
Activity
Jody Garnett
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Summary | RenderContextImpl throws exception | RenderContextImpl fails when MapViewer not shown yet |
Jody Garnett
made changes -
| Status | Open [ 1 ] | Closed [ 6 ] |
| Fix Version/s | UDIG 1.2.RC3 [ 16441 ] | |
| Resolution | Fixed [ 1 ] |
Ugo Taddei
made changes -
| Resolution | Fixed [ 1 ] | |
| Status | Closed [ 6 ] | Reopened [ 4 ] |
Jody Garnett
made changes -
| Status | Reopened [ 4 ] | Resolved [ 5 ] |
| Fix Version/s | UDIG 1.2.0 [ 16264 ] | |
| Fix Version/s | UDIG 1.2.RC3 [ 16441 ] | |
| Resolution | Fixed [ 1 ] |
Jody Garnett
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |