Skip to content

Commit

Permalink
Merge pull request #2704 from SebDieBln/FixFieldCalcDialogParent
Browse files Browse the repository at this point in the history
[Bugfix] Construct the QgsFieldCalculator dialog with the correct parent
  • Loading branch information
NathanW2 committed Jan 27, 2016
2 parents 0d433b0 + 6731ddf commit 80e3f8f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5474,7 +5474,7 @@ void QgisApp::fieldCalculator()
return;
}

QgsFieldCalculator calc( myLayer );
QgsFieldCalculator calc( myLayer, this );
if ( calc.exec() )
{
mMapCanvas->refresh();
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsattributetabledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsfieldcalculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsfieldcalculator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsfieldsproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ void QgsFieldsProperties::on_mCalculateFieldButton_clicked()
return;
}

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

Expand Down

0 comments on commit 80e3f8f

Please sign in to comment.