Skip to content

Commit

Permalink
Remove duplicate map canvas member in subclass, use base class member…
Browse files Browse the repository at this point in the history
… instead
  • Loading branch information
nyalldawson committed Dec 18, 2024
1 parent 1c3d2ae commit f708cbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/gui/labeling/qgslabelinggui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
QgsExpressionContext QgsLabelingGui::createExpressionContext() const
{
QgsExpressionContext expContext;
if ( mCanvas )
if ( mMapCanvas )
{
expContext = mCanvas->createExpressionContext();
expContext = mMapCanvas->createExpressionContext();
}
else
{
Expand Down Expand Up @@ -275,9 +275,9 @@ QgsLabelingGui::QgsLabelingGui( QgsMapLayer *layer, QgsMapCanvas *mapCanvas, con

mFieldExpressionWidget->registerExpressionContextGenerator( this );

mMinScaleWidget->setMapCanvas( mCanvas );
mMinScaleWidget->setMapCanvas( mMapCanvas );
mMinScaleWidget->setShowCurrentScaleButton( true );
mMaxScaleWidget->setMapCanvas( mCanvas );
mMaxScaleWidget->setMapCanvas( mMapCanvas );
mMaxScaleWidget->setShowCurrentScaleButton( true );

mGeometryGeneratorExpressionButton->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
Expand Down
1 change: 0 additions & 1 deletion src/gui/labeling/qgslabelinggui.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ class GUI_EXPORT QgsLabelingGui : public QgsTextFormatWidget
QgsPalLayerSettings mSettings;
LabelMode mMode;
QgsFeature mPreviewFeature;
QgsMapCanvas *mCanvas = nullptr;

QgsLabelObstacleSettings mObstacleSettings;
QgsLabelLineSettings mLineSettings;
Expand Down

0 comments on commit f708cbd

Please sign in to comment.