From f087f4a0a0d6c83c65c309cca18d2c3da954296c Mon Sep 17 00:00:00 2001 From: Blottiere Paul Date: Sun, 21 Oct 2018 22:54:09 +0200 Subject: [PATCH 1/2] Data defined button is not red after deleting auxiliary field --- src/app/qgsvectorlayerproperties.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/app/qgsvectorlayerproperties.cpp b/src/app/qgsvectorlayerproperties.cpp index 8857af49e9a..65b7a7569df 100644 --- a/src/app/qgsvectorlayerproperties.cpp +++ b/src/app/qgsvectorlayerproperties.cpp @@ -1663,11 +1663,6 @@ void QgsVectorLayerProperties::updateAuxiliaryStoragePage( bool reset ) mAuxiliaryStorageFieldsLineEdit->setText( QString() ); mAuxiliaryStorageFeaturesLineEdit->setText( QString() ); } - - if ( reset && labelingDialog ) - { - labelingDialog->setLayer( mLayer ); - } } void QgsVectorLayerProperties::onAuxiliaryLayerNew() From 16e0db40334977b2001fccba36836b6a70de6dbe Mon Sep 17 00:00:00 2001 From: Blottiere Paul Date: Sun, 21 Oct 2018 23:02:23 +0200 Subject: [PATCH 2/2] Removes unused reset parameter --- src/app/qgsvectorlayerproperties.cpp | 10 +++++----- src/app/qgsvectorlayerproperties.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/qgsvectorlayerproperties.cpp b/src/app/qgsvectorlayerproperties.cpp index 65b7a7569df..49a3e296fa6 100644 --- a/src/app/qgsvectorlayerproperties.cpp +++ b/src/app/qgsvectorlayerproperties.cpp @@ -1602,7 +1602,7 @@ void QgsVectorLayerProperties::showHelp() } } -void QgsVectorLayerProperties::updateAuxiliaryStoragePage( bool reset ) +void QgsVectorLayerProperties::updateAuxiliaryStoragePage() { const QgsAuxiliaryLayer *alayer = mLayer->auxiliaryLayer(); @@ -1675,7 +1675,7 @@ void QgsVectorLayerProperties::onAuxiliaryLayerNew() QgsNewAuxiliaryLayerDialog dlg( mLayer, this ); if ( dlg.exec() == QDialog::Accepted ) { - updateAuxiliaryStoragePage( true ); + updateAuxiliaryStoragePage(); } } @@ -1695,7 +1695,7 @@ void QgsVectorLayerProperties::onAuxiliaryLayerClear() QApplication::setOverrideCursor( Qt::WaitCursor ); alayer->clear(); QApplication::restoreOverrideCursor(); - updateAuxiliaryStoragePage( true ); + updateAuxiliaryStoragePage(); mLayer->triggerRepaint(); } } @@ -1726,7 +1726,7 @@ void QgsVectorLayerProperties::onAuxiliaryLayerDelete() mLayer->setAuxiliaryLayer(); // remove auxiliary layer QgsAuxiliaryStorage::deleteTable( uri ); QApplication::restoreOverrideCursor(); - updateAuxiliaryStoragePage( true ); + updateAuxiliaryStoragePage(); mLayer->triggerRepaint(); } } @@ -1814,7 +1814,7 @@ void QgsVectorLayerProperties::deleteAuxiliaryField( int index ) labelingDialog->labelingGui()->deactivateField( static_cast( key ) ); } - updateAuxiliaryStoragePage( true ); + updateAuxiliaryStoragePage(); mSourceFieldsPropertiesDialog->init(); } } diff --git a/src/app/qgsvectorlayerproperties.h b/src/app/qgsvectorlayerproperties.h index 8fe4a9433fe..bb2faca133f 100644 --- a/src/app/qgsvectorlayerproperties.h +++ b/src/app/qgsvectorlayerproperties.h @@ -222,7 +222,7 @@ class APP_EXPORT QgsVectorLayerProperties : public QgsOptionsDialogBase, private //! Adds a new join to mJoinTreeWidget void addJoinToTreeWidget( const QgsVectorLayerJoinInfo &join, int insertIndex = -1 ); - void updateAuxiliaryStoragePage( bool reset = false ); + void updateAuxiliaryStoragePage(); void deleteAuxiliaryField( int index ); QgsExpressionContext mContext;