@@ -751,7 +751,7 @@ class CORE_EXPORT QgsPalLayerSettings
751
751
double zIndex;
752
752
753
753
// called from register feature hook
754
- void calculateLabelSize ( const QFontMetricsF *fm, QString text, double &labelX, double &labelY, QgsFeature *f = nullptr , QgsRenderContext *context = nullptr );
754
+ void calculateLabelSize ( const QFontMetricsF *fm, QString text, double &labelX, double &labelY, const QgsFeature *f = nullptr , QgsRenderContext *context = nullptr );
755
755
756
756
/* *
757
757
* Register a feature for labeling.
@@ -766,7 +766,7 @@ class CORE_EXPORT QgsPalLayerSettings
766
766
* the feature's original geometry will be used as an obstacle for labels. Not available
767
767
* in Python bindings.
768
768
*/
769
- void registerFeature ( QgsFeature &f, QgsRenderContext &context,
769
+ void registerFeature ( const QgsFeature &f, QgsRenderContext &context,
770
770
QgsLabelFeature **labelFeature SIP_PYARGREMOVE = nullptr ,
771
771
QgsGeometry obstacleGeometry SIP_PYARGREMOVE = QgsGeometry() );
772
772
@@ -823,7 +823,7 @@ class CORE_EXPORT QgsPalLayerSettings
823
823
void setFormat ( const QgsTextFormat &format ) { mFormat = format; }
824
824
825
825
// temporary stuff: set when layer gets prepared or labeled
826
- QgsFeature *mCurFeat = nullptr ;
826
+ const QgsFeature *mCurFeat = nullptr ;
827
827
QgsFields mCurFields ;
828
828
int fieldIndex;
829
829
const QgsMapToPixel *xform = nullptr ;
@@ -835,7 +835,6 @@ class CORE_EXPORT QgsPalLayerSettings
835
835
int mFeaturesToLabel = 0 ; // total features that will probably be labeled, may be less (figured before PAL)
836
836
int mFeatsSendingToPal = 0 ; // total features tested for sending into PAL (relative to maxNumLabels)
837
837
int mFeatsRegPal = 0 ; // number of features registered in PAL, when using limitNumLabels
838
-
839
838
private:
840
839
841
840
friend class QgsVectorLayer ; // to allow calling readFromLayerCustomProperties()
@@ -899,7 +898,7 @@ class CORE_EXPORT QgsPalLayerSettings
899
898
/* *
900
899
* Registers a feature as an obstacle only (no label rendered)
901
900
*/
902
- void registerObstacleFeature ( QgsFeature &f, QgsRenderContext &context, QgsLabelFeature **obstacleFeature, const QgsGeometry &obstacleGeometry = QgsGeometry() );
901
+ void registerObstacleFeature ( const QgsFeature &f, QgsRenderContext &context, QgsLabelFeature **obstacleFeature, const QgsGeometry &obstacleGeometry = QgsGeometry() );
903
902
904
903
QMap<Property, QVariant> dataDefinedValues;
905
904
0 commit comments