Skip to content

Commit

Permalink
Pal should also use 64 bit fids
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Mar 10, 2019
1 parent 9de4b88 commit da0e474
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions python/core/auto_generated/qgspallabeling.sip.in
Expand Up @@ -19,14 +19,14 @@ class QgsLabelPosition
#include "qgspallabeling.h" #include "qgspallabeling.h"
%End %End
public: public:
QgsLabelPosition( int id, double r, const QVector< QgsPointXY > &corners, const QgsRectangle &rect, double w, double h, const QString &layer, const QString &labeltext, const QFont &labelfont, bool upside_down, bool diagram = false, bool pinned = false, const QString &providerId = QString() ); QgsLabelPosition( QgsFeatureId id, double r, const QVector< QgsPointXY > &corners, const QgsRectangle &rect, double w, double h, const QString &layer, const QString &labeltext, const QFont &labelfont, bool upside_down, bool diagram = false, bool pinned = false, const QString &providerId = QString() );


QgsLabelPosition(); QgsLabelPosition();
%Docstring %Docstring
Constructor for QgsLabelPosition Constructor for QgsLabelPosition
%End %End


int featureId; QgsFeatureId featureId;
double rotation; double rotation;
QVector< QgsPointXY > cornerPoints; QVector< QgsPointXY > cornerPoints;
QgsRectangle labelRect; QgsRectangle labelRect;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgslabelsearchtree.cpp
Expand Up @@ -71,7 +71,7 @@ void QgsLabelSearchTree::labelsInRect( const QgsRectangle &r, QList<QgsLabelPosi
} }
} }


bool QgsLabelSearchTree::insertLabel( pal::LabelPosition *labelPos, int featureId, const QString &layerName, const QString &labeltext, const QFont &labelfont, bool diagram, bool pinned, const QString &providerId ) bool QgsLabelSearchTree::insertLabel( pal::LabelPosition *labelPos, QgsFeatureId featureId, const QString &layerName, const QString &labeltext, const QFont &labelfont, bool diagram, bool pinned, const QString &providerId )
{ {
if ( !labelPos ) if ( !labelPos )
{ {
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgslabelsearchtree.h
Expand Up @@ -76,7 +76,7 @@ class CORE_EXPORT QgsLabelSearchTree
* \returns TRUE in case of success * \returns TRUE in case of success
* \note not available in Python bindings * \note not available in Python bindings
*/ */
bool insertLabel( pal::LabelPosition *labelPos, int featureId, const QString &layerName, const QString &labeltext, const QFont &labelfont, bool diagram = false, bool pinned = false, const QString &providerId = QString() ) SIP_SKIP; bool insertLabel( pal::LabelPosition *labelPos, QgsFeatureId featureId, const QString &layerName, const QString &labeltext, const QFont &labelfont, bool diagram = false, bool pinned = false, const QString &providerId = QString() ) SIP_SKIP;


private: private:
// set as mutable because RTree template is not const-correct // set as mutable because RTree template is not const-correct
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgspallabeling.h
Expand Up @@ -79,7 +79,7 @@ class QgsExpressionContext;
class CORE_EXPORT QgsLabelPosition class CORE_EXPORT QgsLabelPosition
{ {
public: public:
QgsLabelPosition( int id, double r, const QVector< QgsPointXY > &corners, const QgsRectangle &rect, double w, double h, const QString &layer, const QString &labeltext, const QFont &labelfont, bool upside_down, bool diagram = false, bool pinned = false, const QString &providerId = QString() ) QgsLabelPosition( QgsFeatureId id, double r, const QVector< QgsPointXY > &corners, const QgsRectangle &rect, double w, double h, const QString &layer, const QString &labeltext, const QFont &labelfont, bool upside_down, bool diagram = false, bool pinned = false, const QString &providerId = QString() )
: featureId( id ) : featureId( id )
, rotation( r ) , rotation( r )
, cornerPoints( corners ) , cornerPoints( corners )
Expand All @@ -98,7 +98,7 @@ class CORE_EXPORT QgsLabelPosition
//! Constructor for QgsLabelPosition //! Constructor for QgsLabelPosition
QgsLabelPosition() = default; QgsLabelPosition() = default;


int featureId = -1; QgsFeatureId featureId = FID_NULL;
double rotation = 0; double rotation = 0;
QVector< QgsPointXY > cornerPoints; QVector< QgsPointXY > cornerPoints;
QgsRectangle labelRect; QgsRectangle labelRect;
Expand Down

0 comments on commit da0e474

Please sign in to comment.