Opened 3 weeks ago

Last modified 3 weeks ago

#24750 new defect

Inactive layer icon rendering stopped working — at Initial Version

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

Description

What steps will reproduce the problem?

  1. Download some data, where the data contains POIs with an 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 POIs 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 (0)

Note: See TracTickets for help on using tickets.