Skip to content

Commit

Permalink
Fix cached re-renders of mesh layers drop mesh labels
Browse files Browse the repository at this point in the history
Eg when switching off a vector layer with labels, the labels from
a mesh layer will not be rendered on the map redraw
  • Loading branch information
nyalldawson committed Dec 2, 2024
1 parent d1fe6eb commit f4c1c56
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/labeling/qgspallabeling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#include "qgsvectortilebasiclabeling.h"
#include "qgsfontmanager.h"
#include "qgsvariantutils.h"
#include "qgsmeshlayer.h"

using namespace pal;

Expand Down Expand Up @@ -4088,9 +4089,14 @@ bool QgsPalLabeling::staticWillUseLayer( const QgsMapLayer *layer )
return false;
}

case Qgis::LayerType::Mesh:
{
const QgsMeshLayer *ml = qobject_cast< const QgsMeshLayer * >( layer );
return ml->labeling() && ml->labelsEnabled();
}

case Qgis::LayerType::Raster:
case Qgis::LayerType::Plugin:
case Qgis::LayerType::Mesh:
case Qgis::LayerType::PointCloud:
case Qgis::LayerType::Annotation:
case Qgis::LayerType::Group:
Expand Down

0 comments on commit f4c1c56

Please sign in to comment.