Modify

Opened 3 weeks ago

Last modified 3 weeks ago

#24750 new defect

Inactive layer icon rendering stopped working

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.

Attachments (0)

Change History (1)

comment:1 by gaben, 3 weeks ago

Description: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to gaben.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.