Skip to content
Permalink
Browse files

Some tweaks to the add delimited text layer dialog

- Avoid the crs widget display when there is no geometry expected in the layer
- Align the crs widget with other geometry related settings
- various cleanup of the ui file and tab order
  • Loading branch information
DelazJ authored and nyalldawson committed Jan 23, 2020
1 parent 50514b9 commit 307c497b71a60dec9b5703175e4eee4725338c23
@@ -57,6 +57,7 @@ QgsDelimitedTextSourceSelect::QgsDelimitedTextSourceSelect( QWidget *parent, Qt:

connect( bgFileFormat, static_cast < void ( QButtonGroup::* )( int ) > ( &QButtonGroup::buttonClicked ), swFileFormat, &QStackedWidget::setCurrentIndex );
connect( bgGeomType, static_cast < void ( QButtonGroup::* )( int ) > ( &QButtonGroup::buttonClicked ), swGeomType, &QStackedWidget::setCurrentIndex );
connect( bgGeomType, static_cast < void ( QButtonGroup::* )( int ) > ( &QButtonGroup::buttonClicked ), this, &QgsDelimitedTextSourceSelect::showCrsWidget );

cmbEncoding->clear();
cmbEncoding->addItems( QgsVectorDataProvider::availableEncodings() );
@@ -779,3 +780,9 @@ void QgsDelimitedTextSourceSelect::showHelp()
{
QgsHelp::openHelp( QStringLiteral( "managing_data_source/opening_data.html#importing-a-delimited-text-file" ) );
}

void QgsDelimitedTextSourceSelect::showCrsWidget()
{
crsGeometry->setVisible( !geomTypeNone->isChecked() );
textLabelCrs->setVisible( !geomTypeNone->isChecked() );
}
@@ -55,6 +55,7 @@ class QgsDelimitedTextSourceSelect : public QgsAbstractDataSourceWidget, private
QButtonGroup *bgFileFormat = nullptr;
QButtonGroup *bgGeomType = nullptr;
void showHelp();
void showCrsWidget();

public slots:
void addButtonClicked() override;

0 comments on commit 307c497

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