Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Deprecate refreshLegend
  • Loading branch information
elpaso committed Oct 7, 2018
1 parent 56149ff commit 12fd51e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/app/qgsrasterlayerproperties.cpp
Expand Up @@ -1054,8 +1054,10 @@ void QgsRasterLayerProperties::apply()
mRasterLayer->setCustomProperty( "WMSBackgroundLayer", mBackgroundLayerCheckBox->isChecked() );


// update symbology (this is now disconnected)
// update symbology (this is now deprecated and disconnected)
Q_NOWARN_DEPRECATED_PUSH
emit refreshLegend( mRasterLayer->id(), false );
Q_NOWARN_DEPRECATED_POP

// Force a redraw of the legend
mRasterLayer->setLegend( QgsMapLayerLegend::defaultRasterLegend( mRasterLayer ) );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsrasterlayerproperties.h
Expand Up @@ -141,7 +141,7 @@ class APP_EXPORT QgsRasterLayerProperties : public QgsOptionsDialogBase, private

signals:
//! Emitted when changes to layer were saved to update legend
void refreshLegend( const QString &layerID, bool expandItem );
Q_DECL_DEPRECATED void refreshLegend( const QString &layerID, bool expandItem ) SIP_DEPRECATED;

private:
QPushButton *mBtnStyle = nullptr;
Expand Down
4 changes: 3 additions & 1 deletion src/app/qgsvectorlayerproperties.cpp
Expand Up @@ -754,8 +754,10 @@ void QgsVectorLayerProperties::apply()
mLayer->geometryOptions()->setRemoveDuplicateNodes( mRemoveDuplicateNodesCheckbox->isChecked() );
mLayer->geometryOptions()->setGeometryPrecision( mGeometryPrecisionSpinBox->value() );

// update symbology
// update symbology (this is now deprecated and disconnected)
Q_NOWARN_DEPRECATED_PUSH
emit refreshLegend( mLayer->id() );
Q_NOWARN_DEPRECATED_POP

mLayer->triggerRepaint();
// notify the project we've made a change
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsvectorlayerproperties.h
Expand Up @@ -133,8 +133,8 @@ class APP_EXPORT QgsVectorLayerProperties : public QgsOptionsDialogBase, private
signals:

//! Emitted when changes to layer were saved to update legend
void refreshLegend( const QString &layerID, bool expandItem );
void refreshLegend( const QString &layerID );
Q_DECL_DEPRECATED void refreshLegend( const QString &layerID, bool expandItem ) SIP_DEPRECATED;
Q_DECL_DEPRECATED void refreshLegend( const QString &layerID ) SIP_DEPRECATED;

void toggleEditing( QgsMapLayer * );

Expand Down

0 comments on commit 12fd51e

Please sign in to comment.