Modify

Opened 8 years ago

Closed 8 years ago

Last modified 7 years 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 8 years ago.
patch-fix-13175-2.patch (9.3 KB ) - added by michael2402 8 years ago.
patch-fix-13175-3.patch (10.6 KB ) - added by michael2402 8 years ago.

Download all attachments as: .zip

Change History (15)

by michael2402, 8 years ago

comment:1 by Don-vip, 8 years ago

does not apply cleanly on top of r10576

comment:2 by Don-vip, 8 years ago

Owner: changed from team to michael2402
Status: newneedinfo

comment:3 by michael2402, 8 years ago

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.

by michael2402, 8 years ago

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

comment:4 by michael2402, 8 years ago

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

comment:5 by michael2402, 8 years ago

Owner: changed from michael2402 to team
Status: needinfonew

comment:6 by Don-vip, 8 years ago

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

comment:7 by michael2402, 8 years ago

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 by Don-vip, 8 years ago

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

comment:9 by michael2402, 8 years ago

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 ;-)

by michael2402, 8 years ago

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

comment:10 by Don-vip, 8 years ago

Resolution: fixed
Status: newclosed

In 10809/josm:

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

comment:11 by simon04, 8 years ago

In 11071/josm:

see #13175 - Document deprecated method usage

comment:12 by michael2402, 7 years ago

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.
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.