Ticket #2379 (closed feature: fixed)

Opened 3 years ago

Last modified 3 years ago

featuresremoved event is called with zero lenght array if layer.selectedFeature is supplied to layer.removeFeatures

Reported by: igrcic Owned by: crschmidt
Priority: trivial Milestone: 2.9 Release
Component: Layer.Vector Version: 2.8
Keywords: Cc: ivan.grcic@…
State: Complete

Description

Pretty common case, delete all selected features from layer.

layer.removeFeatures(layer.selectedFeatures);

wont work, because we have to make snapshot of layer.selectedFeatures

(found it out after using GeoExt.data.FeatureStore & GeoExt.grid.FeatureSelectionModel, deleted features wouldnt delete from grid but would dissaper from screen)

Attachments

deleteSelectedFeatures.patch Download (440 bytes) - added by igrcic 3 years ago.
patch-2379-r9928-A0.diff Download (2.9 KB) - added by elemoine 3 years ago.

Change History

Changed 3 years ago by igrcic

Changed 3 years ago by igrcic

  • priority changed from minor to trivial
  • state changed from Complete to Review
  • summary changed from featuresremoved event is not called if layer.selectedFeature is supplied to featuresremoved event is not called if layer.selectedFeature is supplied to layer.removeFeatures

Changed 3 years ago by igrcic

  • cc ivan.grcic@… added

Changed 3 years ago by igrcic

  • summary changed from featuresremoved event is not called if layer.selectedFeature is supplied to layer.removeFeatures to featuresremoved event is called with zero lenght array if layer.selectedFeature is supplied to layer.removeFeatures

Changed 3 years ago by elemoine

Changed 3 years ago by elemoine

  • state changed from Review to Commit

patch-2379-r9928-A0.diff Download adds tests. Thanks igrcic for the bug report and the initial patch.

Changed 3 years ago by elemoine

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

(In [9929]) featuresremoved event is called with zero lenght array if layer.selectedFeature is supplied to layer.removeFeatures, p=igrcic, r,t=me (closes #2379)

Note: See TracTickets for help on using tickets.