Revision 39079 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/MapControl.java

View differences:

MapControl.java
1636 1636

  
1637 1637
			LayerCollectionEvent[] aux = e.getLayerCollectionEvents();
1638 1638
			if (aux.length > 0) {
1639
				boolean bNeedRepaint = false;
1639 1640
				for (int i=0; i < aux.length; i++)
1640 1641
				{
1641 1642
					if (aux[i].getAffectedLayer().getFLayerStatus().isDriverLoaded())
1642 1643
					{
1643
						MapControl.this.drawMap(false);
1644
						return;
1644
						bNeedRepaint = true;
1645
						break;
1645 1646
					}
1646 1647
				}
1647

  
1648
				if (bNeedRepaint) {
1649
					// If a layer has been added or removed, we redraw the whole map
1650
					// but once only.
1651
					MapControl.this.drawMap(false);
1652
					return;
1653
				}
1648 1654
			}
1649 1655

  
1650 1656
			if (e.getLegendEvents().length > 0) {

Also available in: Unified diff