﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3987	Recent change in MapView creating problems in projections	pieren	pieren	"A recent change in Mapview.java (rev.2450) by ""jttt"" introduces a
problem with the Lambert projections. 

The change is the following in Mapview @Override public void paint(Graphics g) :
(before)
       Graphics2D tempG = offscreenBuffer.createGraphics();
       tempG.setColor(Main.pref.getColor(""background"", Color.BLACK));
       tempG.fillRect(0, 0, getWidth(), getHeight());
       for (Layer l: getVisibleLayersInZOrder()) {
           l.paint(tempG, this);
       }
       for (MapViewPaintable mvp : temporaryLayers) {
           mvp.paint(tempG, this);
       }

(and after)
       Graphics2D tempG = offscreenBuffer.createGraphics();
       tempG.setColor(Main.pref.getColor(""background"", Color.BLACK));
       tempG.fillRect(0, 0, getWidth(), getHeight());
       Bounds box = getLatLonBounds(g.getClipBounds());
       for (Layer l: getVisibleLayersInZOrder()) {
           l.paint(tempG, this, box);
       }
       for (MapViewPaintable mvp : temporaryLayers) {
           mvp.paint(tempG, this, box);
       }

The problem is this new call of getLatLonBounds() with random east,
north values the first time a new layer is added. It's not exactly random as the values are based on the screen width and height !

The solution is not to ignore those values in the projection implementation when they are outside the box otherwise I cannot warn the user when he is really working outside the projection limits.

This problem is also independent of the subprojection things to do. It is currently blocking the cadastre-fr plugin working only with the concerned projections.
"	defect	closed	blocker		Core	latest	fixed		
