[udig-devel] RenderManagerAdapters NullPointerException
Leigh Fitzgibbon
leigh.fitzgibbon at eurobios.com
Mon Dec 17 22:01:36 PST 2007
I just worked out what caused the error and how it can be reproduced.
Suppose I open a UDig map editor, then select a layer from the Layers view
to populate the "Table" view. I also have another editor open (in this case
a Eurobios Schedule Editor) and now I select that editor making it the
active editor. I can now cause the error to occur by clicking on a row in
the "Table" view and selecting "Show Selection". I can eliminate the error
by clicking on the UDig map thus making it the active editor.
There are probably many other ways to reproduce it - it seems to be an issue
with the map (or a map?) not being the active editor.
Cheers,
Leigh
-----Original Message-----
From: udig-devel-bounces at lists.refractions.net
[mailto:udig-devel-bounces at lists.refractions.net] On Behalf Of Jody Garnett
Sent: Friday, 14 December 2007 6:19 PM
To: User-friendly Desktop Internet GIS
Subject: Re: [udig-devel] RenderManagerAdapters NullPointerException
Leigh Fitzgibbon wrote:
> I just ran into this error:
>
Thanks; can you tell me what was going on when you got this error? My
guess is you were closing the editor; and a change event fired off after
the editor was closed.
I created an task to track this report:
- http://jira.codehaus.org/browse/UDIG-1345
> Which is caused by the following code because the active editor is null:
>
Thanks: here is my patch; but I am not sure if I should commit; it may
only mask a real problem. Can you tell me more about what happened to
cause this error?
> public void notifyChanged( Notification msg ) {
> manager.checkState();
> switch( msg.getFeatureID(ViewportModel.class) ) {
> case RenderPackage.VIEWPORT_MODEL__BOUNDS: {
> MapEditor activeEditor =
> ApplicationGISInternal.getActiveEditor();
> if( activeEditor != null && activeEditor.isVisible() )
> refreshDirtyArea(msg);
> break;
> }
> case RenderPackage.VIEWPORT_MODEL__CRS: {
> manager.refresh(null);
> break;
> }
> }// switch
> }
Jody
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel
Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.16.17/1179 - Release Date: 9/12/2007
11:06 AM
Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.16.17/1179 - Release Date: 9/12/2007
11:06 AM
More information about the udig-devel
mailing list