Revision 47560 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/ViewPort.java
ViewPort.java | ||
---|---|---|
1565 | 1565 |
*/ |
1566 | 1566 |
public void setProjection(IProjection proj) { |
1567 | 1567 |
if (this.proj == null || !this.proj.getAbrev().equals(proj.getAbrev())) { |
1568 |
this.updateDrawVersion(); |
|
1569 |
this.proj = proj; |
|
1570 |
callProjectionChanged(proj); |
|
1568 |
this.updateDrawVersion(); |
|
1569 |
this.proj = proj; |
|
1570 |
int metros = MapContext.getDistancePosition("Metros"); |
|
1571 |
int grados = MapContext.getDistancePosition("Grados"); |
|
1572 |
if (proj.isProjected()) { |
|
1573 |
if (this.getMapUnits() == grados) { |
|
1574 |
this.setMapUnits(metros); |
|
1575 |
} |
|
1576 |
} else { |
|
1577 |
this.setMapUnits(grados); |
|
1578 |
} |
|
1579 |
|
|
1580 |
callProjectionChanged(proj); |
|
1571 | 1581 |
} |
1572 | 1582 |
} |
1573 | 1583 |
|
Also available in: Unified diff