Ticket #15630: v1-0001-yet-another-debugging-test-commit.patch

File v1-0001-yet-another-debugging-test-commit.patch, 2.0 KB (added by ris, 6 years ago)
  • src/org/openstreetmap/josm/gui/MapViewState.java

    From dae11ee69bdf67dd4b6b5a195b39c1aa41932893 Mon Sep 17 00:00:00 2001
    From: Robert Scott <code@humanleg.org.uk>
    Date: Thu, 18 Jan 2018 00:27:18 +0000
    Subject: [PATCH v1] yet another debugging test commit
    
    ---
     src/org/openstreetmap/josm/gui/MapViewState.java                 | 9 +++++++++
     .../org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java    | 6 ++++++
     2 files changed, 15 insertions(+)
    
    diff --git a/src/org/openstreetmap/josm/gui/MapViewState.java b/src/org/openstreetmap/josm/gui/MapViewState.java
    index 0c80dadea..0e1d0444e 100644
    a b public final class MapViewState implements Serializable {  
    158158        }
    159159    }
    160160
     161    @Override
     162    public String toString() {
     163        return getClass().getName() + " [projecting=" + this.projecting
     164            + " viewWidth=" + this.viewWidth
     165            + " viewHeight=" + this.viewHeight
     166            + " scale=" + this.scale
     167            + " topLeft=" + this.topLeft + "]";
     168    }
     169
    161170    /**
    162171     * The scale in east/north units per pixel.
    163172     * @return The scale.
  • test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java

    diff --git a/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java b/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java
    index cc22a6da0..3c0372b90 100644
    a b public class MinimapDialogTest {  
    481481        // assert downloaded areas are drawn
    482482        this.paintSlippyMap();
    483483
     484        System.err.println("Reported bbox: " + MainApplication.getMap().mapView.getState().getViewArea().getLatLonBoundsBox().toString());
     485
     486        System.err.println("Reported MapViewState: " + MainApplication.getMap().mapView.getState());
     487
     488        System.err.println("Reported slippyMap bounding box: " + this.slippyMap.getBoundingBox());
     489
    484490        ImagePatternMatching.rowMatch(
    485491            paintedSlippyMap,
    486492            paintedSlippyMap.getHeight()/2,