Feature request #1156

Purge negative id on selection when commit

Added by beltegeuse - almost 16 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:C++ Plugins
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:11216

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.

History

#1 Updated by Marco Hugentobler almost 16 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Applied in

#2 Updated by Anonymous over 14 years ago

Milestone Version 1.0.0 deleted

Also available in: Atom PDF