Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixing up code indentation and removing spacer in dialog
  • Loading branch information
ccrook committed Feb 21, 2018
1 parent 25c4fe7 commit 6759993
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 26 deletions.
26 changes: 13 additions & 13 deletions src/providers/delimitedtext/qgsdelimitedtextsourceselect.cpp
Expand Up @@ -154,7 +154,7 @@ void QgsDelimitedTextSourceSelect::addButtonClicked()
url.addQueryItem( QStringLiteral( "xyDms" ), QStringLiteral( "yes" ) );
}

bool haveGeom=true;
bool haveGeom = true;
if ( geomTypeXY->isChecked() )
{
if ( !cmbXField->currentText().isEmpty() && !cmbYField->currentText().isEmpty() )
Expand All @@ -179,15 +179,15 @@ void QgsDelimitedTextSourceSelect::addButtonClicked()
}
else
{
haveGeom=false;
haveGeom = false;
url.addQueryItem( QStringLiteral( "geomType" ), QStringLiteral( "none" ) );
}
if( haveGeom )
if ( haveGeom )
{
QgsCoordinateReferenceSystem crs=crsGeometry->crs();
if( crs.isValid() )
QgsCoordinateReferenceSystem crs = crsGeometry->crs();
if ( crs.isValid() )
{
url.addQueryItem( QStringLiteral( "crs" ), crs.authid() );
url.addQueryItem( QStringLiteral( "crs" ), crs.authid() );
}

}
Expand Down Expand Up @@ -299,11 +299,11 @@ void QgsDelimitedTextSourceSelect::loadSettings( const QString &subkey, bool loa
else geomTypeNone->setChecked( true );
cbxXyDms->setChecked( settings.value( key + "/xyDms", "false" ) == "true" );
swGeomType->setCurrentIndex( bgGeomType->checkedId() );
QString authid=settings.value(key+"/crs","").toString();
QgsCoordinateReferenceSystem crs=QgsCoordinateReferenceSystem::fromOgcWmsCrs(authid);
if( crs.isValid() )
QString authid = settings.value( key + "/crs", "" ).toString();
QgsCoordinateReferenceSystem crs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( authid );
if ( crs.isValid() )
{
crsGeometry->setCrs(crs);
crsGeometry->setCrs( crs );
}
}

Expand Down Expand Up @@ -342,9 +342,9 @@ void QgsDelimitedTextSourceSelect::saveSettings( const QString &subkey, bool sav
if ( geomTypeWKT->isChecked() ) geomColumnType = QStringLiteral( "wkt" );
settings.setValue( key + "/geomColumnType", geomColumnType );
settings.setValue( key + "/xyDms", cbxXyDms->isChecked() ? "true" : "false" );
if( crsGeometry->crs().isValid() )
if ( crsGeometry->crs().isValid() )
{
settings.setValue( key + "/crs", crsGeometry->crs().authid());
settings.setValue( key + "/crs", crsGeometry->crs().authid() );
}
}

Expand Down Expand Up @@ -732,7 +732,7 @@ bool QgsDelimitedTextSourceSelect::validate()
{
message = tr( "The WKT field name must be selected" );
}
else if ( ! geomTypeNone->isChecked() && ! crsGeometry->crs().isValid() )
else if ( ! geomTypeNone->isChecked() && ! crsGeometry->crs().isValid() )
{
message = tr( "The CRS must be selected" );
}
Expand Down
13 changes: 0 additions & 13 deletions src/ui/qgsdelimitedtextsourceselectbase.ui
Expand Up @@ -117,19 +117,6 @@
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="lblEncoding">
<property name="text">
Expand Down

0 comments on commit 6759993

Please sign in to comment.