Opened 4 weeks ago

Last modified 4 weeks ago

#24750 new defect

Inactive layer icon rendering stopped working — at Version 1

Reported by: gaben Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report regression Cc:

Description (last modified by gaben)

What steps will reproduce the problem?

  1. Download some data, where the data contains POIs with a mappaint icon
  2. Move one of POIs around just a bit
  3. Download the same area again onto a new layer

What is the expected result?

JOSM should show the inactive layer's POI icon grayed out.

What happens instead?

No icon rendering on the inactive layer. Introduced in r19461 with the if(disabledImgCache != null) check:

// This should fix #21919: NPE due to disabledImgCache being null (race condition with #loadImage())
synchronized (this) {
    if(disabledImgCache != null) {
        Image disImg = GuiHelper.getDisabledImage(img);
        if (disImg instanceof BufferedImage) {
            disabledImgCache = (BufferedImage) disImg;
        } else {
            disabledImgCache = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_ARGB);
            Graphics g = disabledImgCache.getGraphics();
            g.drawImage(disImg, 0, 0, null);
            g.dispose();
        }
    }
}

I'm not being too helpful here, sorry. Once I'll have some time (soon), I can invest more also in JOSM development.

Change History (1)

comment:1 by gaben, 4 weeks ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.