Ignore:
Timestamp:
2011-11-15T23:00:51+01:00 (13 years ago)
Author:
kpastor
Message:

Prints more types of layers correctly now, tested with PicLayer

Location:
applications/editors/josm/plugins/print
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/print/build.xml

    r27049 r27066  
    3030<project name="print" default="dist" basedir=".">
    3131    <!-- enter the SVN commit message -->
    32     <property name="commit.message" value="Release successfully tested with JOSM version 4064 (Ubuntu 11.10)"/>
     32    <property name="commit.message" value="Prints more types of layers correctly now, tested with PicLayer"/>
    3333    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    3434    <property name="plugin.main.version" value="4064"/>
  • applications/editors/josm/plugins/print/src/org/openstreetmap/josm/plugins/print/PrintableMapView.java

    r27046 r27066  
    4949import org.openstreetmap.josm.gui.layer.Layer;
    5050import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    51 import org.openstreetmap.josm.gui.layer.ImageryLayer;
    5251
    5352/**
     
    162161        List<Layer> visibleLayers = getVisibleLayersInZOrder();
    163162        for (Layer l : visibleLayers) {
    164             if (l instanceof ImageryLayer) {
    165                 try {
    166                     /* This statement may have all kinds of unwanted side effects
    167                      * but ImageryLayers heavily depend on Main.map.mapView. */
     163            try {
     164                if (! (l instanceof OsmDataLayer)) {
     165                    /* OsmDataLayer does not need this.*/
     166                   
     167                    /* This manipulations may have all kinds of unwanted side effects
     168                     * but many Layer implementations heavily depend on Main.map.mapView. */
    168169                    Main.map.mapView = this;
    169                     l.paint(g2d, this, box);
    170170                }
    171                 finally {
    172                     Main.map.mapView = mapView;
    173                 }
     171                l.paint(g2d, this, box);
    174172            }
    175             else {
    176                 l.paint(g2d, this, box);
     173            finally {
     174                Main.map.mapView = mapView;
    177175            }
    178176        }
Note: See TracChangeset for help on using the changeset viewer.