Skip to content
Permalink
Browse files

Merge pull request #2704 from SebDieBln/FixFieldCalcDialogParent

[Bugfix] Construct the QgsFieldCalculator dialog with the correct parent
  • Loading branch information
NathanW2 committed Jan 27, 2016
2 parents 0d433b0 + 6731ddf commit 80e3f8fc749e31d19667665fb90c9fb1a64d7f3f
@@ -5474,7 +5474,7 @@ void QgisApp::fieldCalculator()
return;
}

QgsFieldCalculator calc( myLayer );
QgsFieldCalculator calc( myLayer, this );
if ( calc.exec() )
{
mMapCanvas->refresh();
@@ -551,7 +551,7 @@ void QgsAttributeTableDialog::on_mOpenFieldCalculator_clicked()
{
QgsAttributeTableModel* masterModel = mMainView->masterModel();

QgsFieldCalculator calc( mLayer );
QgsFieldCalculator calc( mLayer, this );
if ( calc.exec() == QDialog::Accepted )
{
int col = masterModel->fieldCol( calc.changedAttributeId() );
@@ -27,8 +27,8 @@
#include <QMessageBox>
#include <QSettings>

QgsFieldCalculator::QgsFieldCalculator( QgsVectorLayer* vl )
: QDialog()
QgsFieldCalculator::QgsFieldCalculator( QgsVectorLayer* vl, QWidget* parent )
: QDialog( parent )
, mVectorLayer( vl )
, mAttributeId( -1 )
{
@@ -26,7 +26,7 @@ class APP_EXPORT QgsFieldCalculator: public QDialog, private Ui::QgsFieldCalcula
{
Q_OBJECT
public:
QgsFieldCalculator( QgsVectorLayer* vl );
QgsFieldCalculator( QgsVectorLayer* vl, QWidget* parent = nullptr );
~QgsFieldCalculator();

int changedAttributeId() const { return mAttributeId; }
@@ -762,7 +762,7 @@ void QgsFieldsProperties::on_mCalculateFieldButton_clicked()
return;
}

QgsFieldCalculator calc( mLayer );
QgsFieldCalculator calc( mLayer, this );
calc.exec();
}

0 comments on commit 80e3f8f

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