Skip to content
Permalink
Browse files

dwg import: make curves optional (enabled by default, disabled comple…

…tely with GDAL 1)
  • Loading branch information
jef-n committed Dec 15, 2016
1 parent d5c6b97 commit 69e54ee86115b8879ed377fd53746945443d1e49
Showing with 131 additions and 236 deletions.
  1. +8 −1 src/app/dwg/qgsdwgimportdialog.cpp
  2. +75 −201 src/app/dwg/qgsdwgimporter.cpp
  3. +4 −1 src/app/dwg/qgsdwgimporter.h
  4. +1 −0 src/app/qgisapp.cpp
  5. +43 −33 src/ui/qgsdwgimportbase.ui
@@ -84,6 +84,12 @@ QgsDwgImportDialog::QgsDwgImportDialog( QWidget *parent, Qt::WindowFlags f )
leDatabase->setText( s.value( "/DwgImport/lastDatabase", "" ).toString() );
cbExpandInserts->setChecked( s.value( "/DwgImport/lastExpandInserts", true ).toBool() );
cbMergeLayers->setChecked( s.value( "/DwgImport/lastMergeLayers", false ).toBool() );
cbUseCurves->setChecked( s.value( "/DwgImport/lastUseCurves", true ).toBool() );

#if !defined(GDAL_COMPUTE_VERSION) || GDAL_VERSION_NUM < GDAL_COMPUTE_VERSION(2,0,0)
cbUseCurves->setChecked( false );
cbUseCurves->setHidden( true );
#endif

leDrawing->setReadOnly( true );
pbImportDrawing->setHidden( true );
@@ -109,6 +115,7 @@ QgsDwgImportDialog::~QgsDwgImportDialog()
s.setValue( "/DwgImport/lastDatabase", leDatabase->text() );
s.setValue( "/DwgImport/lastExpandInserts", cbExpandInserts->isChecked() );
s.setValue( "/DwgImport/lastMergeLayers", cbMergeLayers->isChecked() );
s.setValue( "/DwgImport/lastUseCurves", cbUseCurves->isChecked() );
s.setValue( "/Windows/DwgImport/geometry", saveGeometry() );
}

@@ -267,7 +274,7 @@ void QgsDwgImportDialog::on_pbImportDrawing_clicked()
QgsDwgImporter importer( leDatabase->text(), mCrsSelector->crs() );

QString error;
if ( importer.import( leDrawing->text(), error, cbExpandInserts->isChecked() ) )
if ( importer.import( leDrawing->text(), error, cbExpandInserts->isChecked(), cbUseCurves->isChecked() ) )
{
QgisApp::instance()->messageBar()->pushMessage( tr( "Drawing import completed." ), QgsMessageBar::INFO, 4 );
}

0 comments on commit 69e54ee

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