[QGIS-trac] [Quantum GIS] #1156: Purge negative id on selection when commit

Quantum GIS qgis at qgis.org
Tue Jul 15 03:57:48 EDT 2008


#1156: Purge negative id on selection when commit
-----------------------------------------------+----------------------------
   Reporter:  beltegeuse                       |              Owner:  nobody       
       Type:  enhancement                      |             Status:  new          
   Priority:  minor: annoyance or enhancement  |          Milestone:  Version 1.0.0
  Component:  Plugins                          |            Version:  HEAD         
   Keywords:  selection, segmentation, fault   |   Platform_version:               
   Platform:  All                              |           Must_fix:  No           
Status_info:  0                                |  
-----------------------------------------------+----------------------------
 * 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.

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/1156>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list