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
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ class QgsLabelPosition
#include "qgspallabeling.h"
%End
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();
%Docstring
Constructor for QgsLabelPosition
%End

int featureId;
QgsFeatureId featureId;
double rotation;
QVector< QgsPointXY > cornerPoints;
QgsRectangle labelRect;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgslabelsearchtree.cpp
Original file line number Diff line number Diff line change
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 )
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgslabelsearchtree.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class CORE_EXPORT QgsLabelSearchTree
* \returns TRUE in case of success
* \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:
// set as mutable because RTree template is not const-correct
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgspallabeling.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class QgsExpressionContext;
class CORE_EXPORT QgsLabelPosition
{
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 )
, rotation( r )
, cornerPoints( corners )
Expand All @@ -98,7 +98,7 @@ class CORE_EXPORT QgsLabelPosition
//! Constructor for QgsLabelPosition
QgsLabelPosition() = default;

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

0 comments on commit da0e474

Please sign in to comment.