Skip to content

Commit 414609e

Browse files
author
mhugent
committed
Changed feature splitting mechanism such that it is possible to generate several new features with one split
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8008 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 2f8a1d7 commit 414609e

File tree

5 files changed

+215
-826
lines changed

5 files changed

+215
-826
lines changed

src/app/qgsmaptoolsplitfeatures.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,10 @@ void QgsMapToolSplitFeatures::canvasReleaseEvent(QMouseEvent * e)
7979
//bring up dialog if a split was not possible (polygon) or only done once (line)
8080
int topologicalEditing = QgsProject::instance()->readNumEntry("Digitizing", "/TopologicalEditing", 0);
8181
int returnCode = vlayer->splitFeatures(mCaptureList, topologicalEditing);
82-
if(returnCode == 1)
82+
if(returnCode != 0)
8383
{
8484
//several intersections but only one split (most likely line)
85-
QMessageBox::warning(0, tr("Intersection problem"), tr("One or more geometries are intersected several times by the split lines. Those geometries are only split once."));
86-
}
87-
else if(returnCode == 2)
88-
{
89-
//too complex intersection (most likely several polygon intersections)
90-
QMessageBox::warning(0, tr("Intersection problem"), tr("One or more geometries cannot be split because the intersection is too complex. Note that polygon splits can only be done if the split line intersects the polygon once. Also inner polygon rings cannot be split"));
85+
QMessageBox::warning(0, tr("Split error"), tr("An error occured during feature splitting"));
9186
}
9287

9388
mCaptureList.clear();

0 commit comments

Comments
 (0)