Skip to content

Commit 80e3f8f

Browse files
committedJan 27, 2016
Merge pull request #2704 from SebDieBln/FixFieldCalcDialogParent
[Bugfix] Construct the QgsFieldCalculator dialog with the correct parent
2 parents 0d433b0 + 6731ddf commit 80e3f8f

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5474,7 +5474,7 @@ void QgisApp::fieldCalculator()
54745474
return;
54755475
}
54765476

5477-
QgsFieldCalculator calc( myLayer );
5477+
QgsFieldCalculator calc( myLayer, this );
54785478
if ( calc.exec() )
54795479
{
54805480
mMapCanvas->refresh();

‎src/app/qgsattributetabledialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ void QgsAttributeTableDialog::on_mOpenFieldCalculator_clicked()
551551
{
552552
QgsAttributeTableModel* masterModel = mMainView->masterModel();
553553

554-
QgsFieldCalculator calc( mLayer );
554+
QgsFieldCalculator calc( mLayer, this );
555555
if ( calc.exec() == QDialog::Accepted )
556556
{
557557
int col = masterModel->fieldCol( calc.changedAttributeId() );

‎src/app/qgsfieldcalculator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
#include <QMessageBox>
2828
#include <QSettings>
2929

30-
QgsFieldCalculator::QgsFieldCalculator( QgsVectorLayer* vl )
31-
: QDialog()
30+
QgsFieldCalculator::QgsFieldCalculator( QgsVectorLayer* vl, QWidget* parent )
31+
: QDialog( parent )
3232
, mVectorLayer( vl )
3333
, mAttributeId( -1 )
3434
{

‎src/app/qgsfieldcalculator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class APP_EXPORT QgsFieldCalculator: public QDialog, private Ui::QgsFieldCalcula
2626
{
2727
Q_OBJECT
2828
public:
29-
QgsFieldCalculator( QgsVectorLayer* vl );
29+
QgsFieldCalculator( QgsVectorLayer* vl, QWidget* parent = nullptr );
3030
~QgsFieldCalculator();
3131

3232
int changedAttributeId() const { return mAttributeId; }

‎src/app/qgsfieldsproperties.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ void QgsFieldsProperties::on_mCalculateFieldButton_clicked()
762762
return;
763763
}
764764

765-
QgsFieldCalculator calc( mLayer );
765+
QgsFieldCalculator calc( mLayer, this );
766766
calc.exec();
767767
}
768768

0 commit comments

Comments
 (0)
Please sign in to comment.