Changeset 13150 in josm


Ignore:
Timestamp:
2017-11-23T03:14:45+01:00 (3 weeks ago)
Author:
Don-vip
Message:

fix #14778 - stroke not reset after drawing of large areas produced graphics artifacts when painting world bounds and selection rectangles, bug seen when filtering ways only, as way rendering reset the stroke

Location:
trunk/src/org/openstreetmap/josm
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/FilterModel.java

    r12851 r13150  
    2121import org.openstreetmap.josm.data.osm.search.SearchParseError;
    2222import org.openstreetmap.josm.gui.MainApplication;
    23 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    2423import org.openstreetmap.josm.gui.widgets.OSDLabel;
    2524import org.openstreetmap.josm.spi.preferences.Config;
     
    200199
    201200    private static void updateMap() {
    202         OsmDataLayer editLayer = MainApplication.getLayerManager().getEditLayer();
    203         if (editLayer != null) {
    204             editLayer.invalidate();
    205         }
     201        MainApplication.getLayerManager().invalidateEditLayer();
    206202    }
    207203
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r12966 r13150  
    428428                    g.draw(area);
    429429                    g.setClip(oldClip);
     430                    g.setStroke(new BasicStroke());
    430431                }
    431432            } else {
  • trunk/src/org/openstreetmap/josm/gui/dialogs/FilterDialog.java

    r13137 r13150  
    9191        MapFrame.removeMapModeChangeListener(this);
    9292        filterModel.model.clearFilterFlags();
    93         MainApplication.getMap().mapView.repaint();
     93        MainApplication.getLayerManager().invalidateEditLayer();
    9494    }
    9595
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractMapViewPaintable.java

    r12107 r13150  
    8585     */
    8686    public void invalidate() {
     87        PaintableInvalidationEvent event = new PaintableInvalidationEvent(this);
    8788        for (PaintableInvalidationListener l : invalidationListeners) {
    88             l.paintableInvalidated(new PaintableInvalidationEvent(this));
     89            l.paintableInvalidated(event);
    8990        }
    9091    }
  • trunk/src/org/openstreetmap/josm/gui/layer/MainLayerManager.java

    r13133 r13150  
    397397    }
    398398
     399    /**
     400     * Invalidates current edit layer, if any. Does nothing of there is no edit layer.
     401     * @since 13150
     402     */
     403    public void invalidateEditLayer() {
     404        if (editLayer != null) {
     405            editLayer.invalidate();
     406        }
     407    }
     408
    399409    @Override
    400410    protected synchronized void realResetState() {
Note: See TracChangeset for help on using the changeset viewer.