Skip to content

Commit 018467f

Browse files
committedOct 23, 2017
[Geometry checker] Fix determining active layer geometry types
1 parent 81a4a52 commit 018467f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
 

‎src/plugins/geometry_checker/ui/qgsgeometrycheckersetuptab.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,11 @@ void QgsGeometryCheckerSetupTab::validateInput()
171171
QStringList layerCrs = QStringList() << mIface->mapCanvas()->mapSettings().destinationCrs().authid();
172172
QList<QgsVectorLayer *> layers = getSelectedLayers();
173173
int nApplicable = 0;
174+
int nPoint = 0;
175+
int nLineString = 0;
176+
int nPolygon = 0;
174177
if ( !layers.isEmpty() )
175178
{
176-
int nPoint = 0;
177-
int nLineString = 0;
178-
int nPolygon = 0;
179179
for ( QgsVectorLayer *layer : layers )
180180
{
181181
QgsWkbTypes::GeometryType geomType = layer->geometryType();
@@ -193,10 +193,10 @@ void QgsGeometryCheckerSetupTab::validateInput()
193193
}
194194
layerCrs.append( layer->crs().authid() );
195195
}
196-
for ( const QgsGeometryCheckFactory *factory : QgsGeometryCheckFactoryRegistry::getCheckFactories() )
197-
{
198-
nApplicable += factory->checkApplicability( ui, nPoint, nLineString, nPolygon );
199-
}
196+
}
197+
for ( const QgsGeometryCheckFactory *factory : QgsGeometryCheckFactoryRegistry::getCheckFactories() )
198+
{
199+
nApplicable += factory->checkApplicability( ui, nPoint, nLineString, nPolygon );
200200
}
201201

202202
bool outputOk = ui.radioButtonOutputModifyInput->isChecked() || !ui.lineEditOutputDirectory->text().isEmpty();

0 commit comments

Comments
 (0)
Please sign in to comment.