Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] TilingRenderer issue with Redraw tool

Thanks cole,

I had been aware of the problem but haven't had time to fix it. That is the correct solution, please check it in.

Jesse

Cole Markham wrote:

There is a problem with the Redraw tool when using the TilingRenderer.
If the database is changed external to uDig, clicking the redraw tool
will not force a refresh from the database. This is not the case with
uDig 1.0.1, it does refresh from the database.

What is happening is that TilingRenderer sees the Redraw request the
same as a Pan (except with no changes to the view area). Therefore it
copies the existing image and never calls the child renderer.

I think the desired behavior would be for Redraw to force a full
refresh of the viewport, since that is what the user probably
expected.

My proposed change is to modifty RefreshTool (not sure why some stuff
says refresh and others redraw) to set the renderer states to
RENDER_REQUEST. This will force TilingRenderer (or any other renderer
for that matter) to call the child renderer which will redraw the
layers. I have tested this and it works. I will check this into trunk
if this is what everyone thinks we should do.

Here is the change to the run() method of RefreshTool:

   public void run() {
********* new changes *********
       // Force an update of the renderers
       List<IRenderer> renderers = context.getRenderManager().getRenderers();
       for(IRenderer renderer : renderers){
           ((Renderer)renderer).setState(IRenderer.RENDER_REQUEST);
       }
********** end new changes ******
       context.getRenderManager().refresh(null);
   }


Cole
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top