Skip to content
Permalink
Browse files
Fix naming clash
  • Loading branch information
nyalldawson committed Sep 7, 2021
1 parent 9c0f688 commit a8b6f89316a76f40f328c375359d0734d15e278b
@@ -114,7 +114,7 @@ Reset to original (vector layer) values
.. versionadded:: 3.14
%End

virtual void setContext( const QgsMapLayerConfigWidgetContext &context );
virtual void setMapLayerConfigWidgetContext( const QgsMapLayerConfigWidgetContext &context );
%Docstring
Sets the ``context`` under which the widget is being shown.

@@ -50,12 +50,12 @@ void QgsAnnotationItemPropertiesWidget::syncToLayer( QgsMapLayer *layer )
return;

// check context
setItemId( mContext.annotationId() );
setItemId( mMapLayerConfigWidgetContext.annotationId() );
}

void QgsAnnotationItemPropertiesWidget::setContext( const QgsMapLayerConfigWidgetContext &context )
void QgsAnnotationItemPropertiesWidget::setMapLayerConfigWidgetContext( const QgsMapLayerConfigWidgetContext &context )
{
QgsMapLayerConfigWidget::setContext( context );
QgsMapLayerConfigWidget::setMapLayerConfigWidgetContext( context );
setItemId( context.annotationId() );
}

@@ -79,7 +79,7 @@ void QgsAnnotationItemPropertiesWidget::onChanged()
// set the annotation layer's item's properties to match the widget
std::unique_ptr< QgsAnnotationItem > newItem( mItemWidget->createItem() );

mLayer->replaceItem( mContext.annotationId(), newItem.release() );
mLayer->replaceItem( mMapLayerConfigWidgetContext.annotationId(), newItem.release() );
}

void QgsAnnotationItemPropertiesWidget::setItemId( const QString &itemId )
@@ -31,7 +31,7 @@ class QgsAnnotationItemPropertiesWidget : public QgsMapLayerConfigWidget
QgsAnnotationItemPropertiesWidget( QgsAnnotationLayer *layer, QgsMapCanvas *canvas, QWidget *parent );

void syncToLayer( QgsMapLayer *layer ) override;
void setContext( const QgsMapLayerConfigWidgetContext &context ) override;
void setMapLayerConfigWidgetContext( const QgsMapLayerConfigWidgetContext &context ) override;
void setDockMode( bool dockMode ) override;

public slots:
@@ -445,7 +445,7 @@ void QgsLayerStylingWidget::updateCurrentWidgetLayer()
if ( panel )
{
panel->setDockMode( true );
panel->setContext( mContext );
panel->setMapLayerConfigWidgetContext( mContext );
connect( panel, &QgsPanelWidget::widgetChanged, this, &QgsLayerStylingWidget::autoApply );
mWidgetStack->setMainPanel( panel );
}
@@ -23,7 +23,7 @@ QgsMapLayerConfigWidget::QgsMapLayerConfigWidget( QgsMapLayer *layer, QgsMapCanv

}

void QgsMapLayerConfigWidget::setContext( const QgsMapLayerConfigWidgetContext &context )
void QgsMapLayerConfigWidget::setMapLayerConfigWidgetContext( const QgsMapLayerConfigWidgetContext &context )
{
mContext = context;
mMapLayerConfigWidgetContext = context;
}
@@ -127,7 +127,7 @@ class GUI_EXPORT QgsMapLayerConfigWidget : public QgsPanelWidget
*
* Subclasses should take care to call the base class implementation when overriding this method.
*/
virtual void setContext( const QgsMapLayerConfigWidgetContext &context );
virtual void setMapLayerConfigWidgetContext( const QgsMapLayerConfigWidgetContext &context );

public slots:

@@ -155,7 +155,7 @@ class GUI_EXPORT QgsMapLayerConfigWidget : public QgsPanelWidget

QgsMapLayer *mLayer = nullptr;
QgsMapCanvas *mMapCanvas = nullptr;
QgsMapLayerConfigWidgetContext mContext;
QgsMapLayerConfigWidgetContext mMapLayerConfigWidgetContext;
};

#endif // QGSMAPLAYERCONFIGWIDGET_H

0 comments on commit a8b6f89

Please sign in to comment.