Ticket #2775 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

clear method should remove references to features

Reported by: tschaub Owned by: crschmidt
Priority: minor Milestone: 2.10 Release
Component: Renderer.Canvas Version: 2.9
Keywords: Cc:
State: Complete

Description

With the elements renderers, you can call clear to effectively erase features from the renderer. With the canvas renderer, those features come back on the next draw.

Attachments

2775.patch Download (0.9 KB) - added by tschaub 4 years ago.
remove feature map

Change History

Changed 4 years ago by tschaub

remove feature map

Changed 4 years ago by tschaub

  • state set to Review

An alternative if we don't like the duplicated line of code would be to add a "soft" arg to clear. Called with soft true, feature references would not be removed.

As is, tests pass (and clear permanently clears).

Changed 4 years ago by crschmidt

  • state changed from Review to Commit

This looks fine to me. If the general meaning of clear() is 'get rid of and don't draw again until I tell you otherwise", the Canvas renderer is currently breaking that; fixing that makes sense. Code looks solid, and doesn't appear to break anything.

Changed 4 years ago by tschaub

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed

(In [10595]) Making it so the clear method on the canvas renderer permanently clears features (as with the other renderers). r=crschmidt (closes #2775)

Note: See TracTickets for help on using tickets.