Changeset 16668 in josm


Ignore:
Timestamp:
2020-06-17T12:05:30+02:00 (4 weeks ago)
Author:
stoecker
Message:

don't call function twice

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r16563 r16668  
    459459            MapViewRectangle clipBounds = getState().getViewArea(g.getClipBounds());
    460460            MapViewGraphics paintGraphics = new MapViewGraphics(this, g, clipBounds);
    461 
    462             if (layer.getOpacity() < 1) {
    463                 g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, (float) layer.getOpacity()));
     461            float opacity = (float) layer.getOpacity();
     462
     463            if (opacity < 1.0f) {
     464                g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opacity));
    464465            }
    465466            painter.paint(paintGraphics);
Note: See TracChangeset for help on using the changeset viewer.