Skip to content
Permalink
Browse files

Replace more splitted by split

  • Loading branch information
DelazJ committed Dec 29, 2016
1 parent a56f928 commit 69af2facdea325ad4eb18e2bca05e31eb1e31244
Showing with 12 additions and 12 deletions.
  1. +6 −6 src/core/qgsvectorlayereditutils.cpp
  2. +6 −6 tests/src/python/test_qgsdelimitedtextprovider.py
@@ -301,7 +301,7 @@ int QgsVectorLayerEditUtils::splitFeatures( const QList<QgsPoint>& splitLine, bo
QgsRectangle bBox; //bounding box of the split line
int returnCode = 0;
int splitFunctionReturn; //return code of QgsGeometry::splitGeometry
int numberOfSplittedFeatures = 0;
int numberOfSplitFeatures = 0;

QgsFeatureIterator features;
const QgsFeatureIds selectedIds = L->selectedFeatureIds();
@@ -384,15 +384,15 @@ int QgsVectorLayerEditUtils::splitFeatures( const QList<QgsPoint>& splitLine, bo
addTopologicalPoints( *topol_it );
}
}
++numberOfSplittedFeatures;
++numberOfSplitFeatures;
}
else if ( splitFunctionReturn > 1 ) //1 means no split but also no error
{
returnCode = splitFunctionReturn;
}
}

if ( numberOfSplittedFeatures == 0 && !selectedIds.isEmpty() )
if ( numberOfSplitFeatures == 0 && !selectedIds.isEmpty() )
{
//There is a selection but no feature has been split.
//Maybe user forgot that only the selected features are split
@@ -411,7 +411,7 @@ int QgsVectorLayerEditUtils::splitParts( const QList<QgsPoint>& splitLine, bool
QgsRectangle bBox; //bounding box of the split line
int returnCode = 0;
int splitFunctionReturn; //return code of QgsGeometry::splitGeometry
int numberOfSplittedParts = 0;
int numberOfSplitParts = 0;

QgsFeatureIterator fit;

@@ -519,15 +519,15 @@ int QgsVectorLayerEditUtils::splitParts( const QList<QgsPoint>& splitLine, bool
addTopologicalPoints( *topol_it );
}
}
++numberOfSplittedParts;
++numberOfSplitParts;
}
else if ( splitFunctionReturn > 1 ) //1 means no split but also no error
{
returnCode = splitFunctionReturn;
}
}

if ( numberOfSplittedParts == 0 && L->selectedFeatureCount() > 0 && returnCode == 0 )
if ( numberOfSplitParts == 0 && L->selectedFeatureCount() > 0 && returnCode == 0 )
{
//There is a selection but no feature has been split.
//Maybe user forgot that only the selected features are split
@@ -88,14 +88,14 @@ def toString(self):


def normalize_query_items_order(s):
splitted_url = s.split('?')
urlstr = splitted_url[0]
if len(splitted_url) == 2:
items_list = splitted_url[1].split('&')
split_url = s.split('?')
urlstr = split_url[0]
if len(split_url) == 2:
items_list = split_url[1].split('&')
items_map = {}
for item in items_list:
splitted_item = item.split('=')
items_map[splitted_item[0]] = splitted_item[1]
split_item = item.split('=')
items_map[split_item[0]] = split_item[1]
first_arg = True
for k in sorted(items_map.keys()):
if first_arg:

0 comments on commit 69af2fa

Please sign in to comment.
You can’t perform that action at this time.