Bug report #1103

split feature - Bug in copy attributes

Added by beltegeuse - over 16 years ago. Updated over 15 years ago.

Status:Closed
Priority:Low
Assignee:beltegeuse -
Category:Vectors
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11163

Description

Hi all,
I use QGIS for one month and i think it's a good soft but there is a problems with the split feature.
Explain :

1. You have a feature with attribute and id (ex : 3660)

2. You split these feature so you have two features. (The original feature with id = 3660 and the new feature id = -1).

3. You split the new feature (id = -1) so we have three features (id : [3660,-1,-2]).

4. You split one once again the feature (id = -1) so you get a feature with the id is -4. You have 4 features.

=> And when your commit change, your feature (old id = -3) have no attribute.
[[ScreenShot]] :

SceenShot.png - screenshot (26 KB) beltegeuse -, 2008-05-23 10:06 AM

History

#1 Updated by beltegeuse - over 16 years ago

  • Status changed from Open to In Progress

it's link with QgsGeometryMap. QgsGeometryMap bug when featureId is negative. To have a different issue :

In qgsvectorlayer.cpp :
in splitfeature fucntion :
remplace :

mChangedGeometries.insert(select_it->featureId(), *(select_it->geometry()));

by :

if(select_it->featureId()<0)
{

}
else
{
 mChangedGeometries.insert(select_it->featureId(), *(select_it->geometry()));
}

#2 Updated by beltegeuse - over 16 years ago

  • Resolution set to fixed
  • Status changed from In Progress to Closed

#3 Updated by Anonymous over 15 years ago

Milestone Version 1.0.0 deleted

Also available in: Atom PDF