Skip to content
Permalink
Browse files

Simpler geometry restore for field calculator dialog

  • Loading branch information
nyalldawson committed Oct 14, 2018
1 parent c89a542 commit 5f7f7b616a96d8da535610d86229e96f4625b2bd
Showing with 3 additions and 9 deletions.
  1. +3 −9 src/app/qgsfieldcalculator.cpp
@@ -25,6 +25,7 @@
#include "qgsexpressioncontext.h"
#include "qgsgeometry.h"
#include "qgssettings.h"
#include "qgsgui.h"

#include <QMessageBox>

@@ -49,6 +50,8 @@ QgsFieldCalculator::QgsFieldCalculator( QgsVectorLayer *vl, QWidget *parent )
connect( mOutputFieldNameLineEdit, &QLineEdit::textChanged, this, &QgsFieldCalculator::mOutputFieldNameLineEdit_textChanged );
connect( mOutputFieldTypeComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::activated ), this, &QgsFieldCalculator::mOutputFieldTypeComboBox_activated );

QgsGui::enableAutoGeometryRestore( this );

if ( !vl )
return;

@@ -148,15 +151,6 @@ QgsFieldCalculator::QgsFieldCalculator( QgsVectorLayer *vl, QWidget *parent )
mInfoIcon->setPixmap( style()->standardPixmap( QStyle::SP_MessageBoxInformation ) );

setOkButtonState();

QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "Windows/QgsFieldCalculator/geometry" ) ).toByteArray() );
}

QgsFieldCalculator::~QgsFieldCalculator()
{
QgsSettings settings;
settings.setValue( QStringLiteral( "Windows/QgsFieldCalculator/geometry" ), saveGeometry() );
}

void QgsFieldCalculator::accept()

0 comments on commit 5f7f7b6

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