Modify

Opened 11 months ago

Closed 10 months ago

Last modified 6 weeks ago

#13175 closed enhancement (fixed)

[Patch] Use invalidation event instead of isChanged()

Reported by: michael2402 Owned by: team
Priority: normal Milestone: 16.08
Component: Core mappaint Version:
Keywords: gsoc-core Cc: Don-vip, bastiK, stoecker

Description

Make the MapView trace the source of invalidation events and thus make isChanged() obsolete.

Attachments (3)

patch-mapview-trace-invalidation.patch (9.4 KB) - added by michael2402 11 months ago.
patch-fix-13175-2.patch (9.3 KB) - added by michael2402 11 months ago.
patch-fix-13175-3.patch (10.6 KB) - added by michael2402 10 months ago.

Download all attachments as: .zip

Change History (15)

Changed 11 months ago by michael2402

comment:1 Changed 11 months ago by Don-vip

does not apply cleanly on top of r10576

comment:2 Changed 11 months ago by Don-vip

Owner: changed from team to michael2402
Status: newneedinfo

comment:3 Changed 11 months ago by michael2402

Milestone: 16.0716.08

I'd suggest to leave this for 16.08. I'm working on the TileSource layers and will split the patch for them.

Changed 11 months ago by michael2402

Attachment: patch-fix-13175-2.patch added

comment:4 Changed 11 months ago by michael2402

I attached a new file compatible to the current source status.

comment:5 Changed 11 months ago by michael2402

Owner: changed from michael2402 to team
Status: needinfonew

comment:6 Changed 11 months ago by Don-vip

The method Layer.isChanged() is deprecated but still used in MapView.paint()?

comment:7 Changed 10 months ago by michael2402

Yes. Layers that still implement it (plugins) will use it to tell the MapView that they have been changed. This is why the MapView still uses it in addition to the invalidation events.

comment:8 Changed 10 months ago by Don-vip

OK. I'd prefer to see the two TODOs implemented before merging it, I fear the absence of delays to be problematic.

comment:9 Changed 10 months ago by michael2402

The absence worked for years for me.

repaint(100) will repaint after at most 100ms. Internally it triggers the long form of the JComponent#repaint method which ignores that parameter.

But I added a timer any way ;-)

Changed 10 months ago by michael2402

Attachment: patch-fix-13175-3.patch added

comment:10 Changed 10 months ago by Don-vip

Resolution: fixed
Status: newclosed

In 10809/josm:

fix #13175 - Use invalidation event instead of isChanged() (patch by michael2402) - gsoc-core

comment:11 Changed 9 months ago by simon04

In 11071/josm:

see #13175 - Document deprecated method usage

comment:12 Changed 6 weeks ago by michael2402

In 12170/josm:

"See #13175, see #14120: Remove isChanged() method call in map view - all layers should invalidate correctly now."

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.