@@ -73,6 +73,8 @@ QgsVectorLayerSaveAsDialog::QgsVectorLayerSaveAsDialog( QgsVectorLayer *layer, i
73
73
void QgsVectorLayerSaveAsDialog::setup ()
74
74
{
75
75
setupUi ( this );
76
+ QgsGui::instance ()->enableAutoGeometryRestore ( this );
77
+
76
78
connect ( mFormatComboBox , static_cast <void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this , &QgsVectorLayerSaveAsDialog::mFormatComboBox_currentIndexChanged );
77
79
connect ( mCrsSelector , &QgsProjectionSelectionWidget::crsChanged, this , &QgsVectorLayerSaveAsDialog::mCrsSelector_crsChanged );
78
80
connect ( mSymbologyExportComboBox , static_cast <void ( QComboBox::* )( const QString & )>( &QComboBox::currentIndexChanged ), this , &QgsVectorLayerSaveAsDialog::mSymbologyExportComboBox_currentIndexChanged );
@@ -83,16 +85,14 @@ void QgsVectorLayerSaveAsDialog::setup()
83
85
connect ( mAttributeTable , &QTableWidget::itemChanged, this , &QgsVectorLayerSaveAsDialog::mAttributeTable_itemChanged );
84
86
connect ( buttonBox, &QDialogButtonBox::helpRequested, this , &QgsVectorLayerSaveAsDialog::showHelp );
85
87
86
- QgsSettings settings;
87
- restoreGeometry ( settings.value ( QStringLiteral ( " Windows/VectorLayerSaveAs/geometry" ) ).toByteArray () );
88
-
89
88
const QList< QgsVectorFileWriter::DriverDetails > drivers = QgsVectorFileWriter::ogrDriverList ();
90
89
mFormatComboBox ->blockSignals ( true );
91
90
for ( const QgsVectorFileWriter::DriverDetails &driver : drivers )
92
91
{
93
92
mFormatComboBox ->addItem ( driver.longName , driver.driverName );
94
93
}
95
94
95
+ QgsSettings settings;
96
96
QString format = settings.value ( QStringLiteral ( " UI/lastVectorFormat" ), " GPKG" ).toString ();
97
97
mFormatComboBox ->setCurrentIndex ( mFormatComboBox ->findData ( format ) );
98
98
mFormatComboBox ->blockSignals ( false );
@@ -153,8 +153,7 @@ void QgsVectorLayerSaveAsDialog::setup()
153
153
QFileInfo fileInfo ( filePath );
154
154
leLayername->setText ( fileInfo.baseName () );
155
155
}
156
- buttonBox->button ( QDialogButtonBox::Ok )->setEnabled (
157
- !filePath.isEmpty () && QFileInfo ( filePath ).absoluteDir ().exists () );
156
+ buttonBox->button ( QDialogButtonBox::Ok )->setEnabled ( !filePath.isEmpty () );
158
157
} );
159
158
}
160
159
@@ -237,8 +236,6 @@ QList<QPair<QLabel *, QWidget *> > QgsVectorLayerSaveAsDialog::createControls( c
237
236
238
237
QgsVectorLayerSaveAsDialog::~QgsVectorLayerSaveAsDialog ()
239
238
{
240
- QgsSettings settings;
241
- settings.setValue ( QStringLiteral ( " Windows/VectorLayerSaveAs/geometry" ), saveGeometry () );
242
239
}
243
240
244
241
void QgsVectorLayerSaveAsDialog::accept ()
0 commit comments