22
22
#include " qgslayertreegroup.h"
23
23
#include " qgsvectorlayer.h"
24
24
#include " qgsproject.h"
25
+ #include " qgshelp.h"
25
26
#include " qgis.h"
26
27
#include " qgsfieldcombobox.h"
27
28
#include " qgisapp.h"
30
31
#include " qgsmapcanvas.h"
31
32
#include " qgsprojectionselectiondialog.h"
32
33
#include " qgssettings.h"
34
+ #include " qgsgui.h"
33
35
34
36
#include < QFileDialog>
35
37
#include < QPushButton>
@@ -422,6 +424,8 @@ QgsDxfExportDialog::QgsDxfExportDialog( QWidget *parent, Qt::WindowFlags f )
422
424
{
423
425
setupUi ( this );
424
426
connect ( mFileSelectionButton , &QToolButton::clicked, this , &QgsDxfExportDialog::mFileSelectionButton_clicked );
427
+ QgsGui::instance ()->enableAutoGeometryRestore ( this );
428
+
425
429
connect ( mVisibilityPresets , static_cast <void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this , &QgsDxfExportDialog::mVisibilityPresets_currentIndexChanged );
426
430
connect ( mCrsSelector , &QgsProjectionSelectionWidget::crsChanged, this , &QgsDxfExportDialog::mCrsSelector_crsChanged );
427
431
@@ -465,7 +469,6 @@ QgsDxfExportDialog::QgsDxfExportDialog( QWidget *parent, Qt::WindowFlags f )
465
469
mVisibilityPresets ->setCurrentIndex ( mVisibilityPresets ->findText ( QgsProject::instance ()->readEntry ( QStringLiteral ( " dxf" ), QStringLiteral ( " /lastVisibliltyPreset" ), QLatin1String ( " " ) ) ) );
466
470
467
471
buttonBox->button ( QDialogButtonBox::Ok )->setEnabled ( false );
468
- restoreGeometry ( s.value ( QStringLiteral ( " /Windows/DxfExport/geometry" ) ).toByteArray () );
469
472
470
473
long crsid = QgsProject::instance ()->readEntry ( QStringLiteral ( " dxf" ), QStringLiteral ( " /lastDxfCrs" ),
471
474
s.value ( QStringLiteral ( " qgis/lastDxfCrs" ), QString::number ( QgsProject::instance ()->crs ().srsid () ) ).toString ()
@@ -484,8 +487,6 @@ QgsDxfExportDialog::QgsDxfExportDialog( QWidget *parent, Qt::WindowFlags f )
484
487
QgsDxfExportDialog::~QgsDxfExportDialog ()
485
488
{
486
489
delete mLayerTreeGroup ;
487
-
488
- QgsSettings ().setValue ( QStringLiteral ( " /Windows/DxfExport/geometry" ), saveGeometry () );
489
490
}
490
491
491
492
void QgsDxfExportDialog::mVisibilityPresets_currentIndexChanged ( int index )
0 commit comments