Skip to content

Commit

Permalink
Auto restore dialog geometry + fix help include
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ authored and nyalldawson committed Jan 16, 2018
1 parent fe319af commit 10ee75b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/app/qgsdxfexportdialog.cpp
Expand Up @@ -22,6 +22,7 @@
#include "qgslayertreegroup.h"
#include "qgsvectorlayer.h"
#include "qgsproject.h"
#include "qgshelp.h"
#include "qgis.h"
#include "qgsfieldcombobox.h"
#include "qgisapp.h"
Expand All @@ -30,6 +31,7 @@
#include "qgsmapcanvas.h"
#include "qgsprojectionselectiondialog.h"
#include "qgssettings.h"
#include "qgsgui.h"

#include <QFileDialog>
#include <QPushButton>
Expand Down Expand Up @@ -422,6 +424,8 @@ QgsDxfExportDialog::QgsDxfExportDialog( QWidget *parent, Qt::WindowFlags f )
{
setupUi( this );
connect( mFileSelectionButton, &QToolButton::clicked, this, &QgsDxfExportDialog::mFileSelectionButton_clicked );
QgsGui::instance()->enableAutoGeometryRestore( this );

connect( mVisibilityPresets, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsDxfExportDialog::mVisibilityPresets_currentIndexChanged );
connect( mCrsSelector, &QgsProjectionSelectionWidget::crsChanged, this, &QgsDxfExportDialog::mCrsSelector_crsChanged );

Expand Down Expand Up @@ -465,7 +469,6 @@ QgsDxfExportDialog::QgsDxfExportDialog( QWidget *parent, Qt::WindowFlags f )
mVisibilityPresets->setCurrentIndex( mVisibilityPresets->findText( QgsProject::instance()->readEntry( QStringLiteral( "dxf" ), QStringLiteral( "/lastVisibliltyPreset" ), QLatin1String( "" ) ) ) );

buttonBox->button( QDialogButtonBox::Ok )->setEnabled( false );
restoreGeometry( s.value( QStringLiteral( "/Windows/DxfExport/geometry" ) ).toByteArray() );

long crsid = QgsProject::instance()->readEntry( QStringLiteral( "dxf" ), QStringLiteral( "/lastDxfCrs" ),
s.value( QStringLiteral( "qgis/lastDxfCrs" ), QString::number( QgsProject::instance()->crs().srsid() ) ).toString()
Expand All @@ -484,8 +487,6 @@ QgsDxfExportDialog::QgsDxfExportDialog( QWidget *parent, Qt::WindowFlags f )
QgsDxfExportDialog::~QgsDxfExportDialog()
{
delete mLayerTreeGroup;

QgsSettings().setValue( QStringLiteral( "/Windows/DxfExport/geometry" ), saveGeometry() );
}

void QgsDxfExportDialog::mVisibilityPresets_currentIndexChanged( int index )
Expand Down
1 change: 0 additions & 1 deletion src/app/qgsdxfexportdialog.h
Expand Up @@ -21,7 +21,6 @@
#include "ui_qgsdxfexportdialogbase.h"
#include "qgslayertreemodel.h"
#include "qgsdxfexport.h"
#include "qgshelp.h"

#include <QList>
#include <QPair>
Expand Down

0 comments on commit 10ee75b

Please sign in to comment.