#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.
Note:
See TracTickets
for help on using tickets.
Applied in r8783