Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#1156 closed enhancement (fixed)

Purge negative id on selection when commit

Reported by: beltegeuse Owned by: nobody
Priority: minor: annoyance Milestone:
Component: C++ Plugins Version: Trunk
Keywords: selection, segmentation, fault Cc: agruson@…
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

  • You select added features (they have negative id).
  • You commit change (commit attribute positive id to added features) but your mSelectedFeatureIds haven't updated and have always negative Id in mSelectedFeatureIds.
  • If the user doesn't reselect features, you have a segmentation fault because if you do a iteration on mSelectedFeatures there are wrong id.

Possible solutions :

  • Erase all negative ids in commitChanges

Advantage : easy to do

Disadvantage: user's selection change when he commit

  • Provider return new id of added feature and replace in mSelectedFeatureIds.

Advantage : no change for user when he commit.

Disadvantage : more change to do in code.

Change History (2)

comment:1 by mhugent, 16 years ago

Resolution: fixed
Status: newclosed

Applied in r8783

comment:2 by (none), 15 years ago

Milestone: Version 1.0.0

Milestone Version 1.0.0 deleted

Note: See TracTickets for help on using tickets.