Skip to content
Permalink
Browse files

Fix rule based labeling does not permit moving labels using interacti…

…ve tool

Fixes #19979
  • Loading branch information
nyalldawson committed Oct 1, 2018
1 parent 750d868 commit 0e2ceb90fe3c4816a71fa681d28a351fdff9c7ab
Showing with 7 additions and 8 deletions.
  1. +1 −3 src/core/qgsrulebasedlabeling.cpp
  2. +6 −5 src/core/qgsrulebasedlabeling.h
@@ -55,14 +55,12 @@ QList<QgsAbstractLabelProvider *> QgsRuleBasedLabelProvider::subProviders()
////////////////////

QgsRuleBasedLabeling::Rule::Rule( QgsPalLayerSettings *settings, int scaleMinDenom, int scaleMaxDenom, const QString &filterExp, const QString &description, bool elseRule )
: mParent( nullptr )
, mSettings( settings )
: mSettings( settings )
, mMaximumScale( scaleMinDenom )
, mMinimumScale( scaleMaxDenom )
, mFilterExp( filterExp )
, mDescription( description )
, mElseRule( elseRule )
, mIsActive( true )

{
initFilter();
@@ -324,17 +324,18 @@ class CORE_EXPORT QgsRuleBasedLabeling : public QgsAbstractVectorLayerLabeling
void updateElseRules();

private:
Rule *mParent; // parent rule (NULL only for root rule)
Rule *mParent = nullptr; // parent rule (NULL only for root rule)
std::unique_ptr<QgsPalLayerSettings> mSettings;
double mMaximumScale = 0;
double mMinimumScale = 0;
QString mFilterExp, mDescription;
bool mElseRule;
QString mFilterExp;
QString mDescription;
bool mElseRule = false;
RuleList mChildren;
RuleList mElseRules;
bool mIsActive; // whether it is enabled or not
bool mIsActive = true; // whether it is enabled or not

QString mRuleKey; // string used for unique identification of rule within labeling
QString mRuleKey = QUuid::createUuid().toString(); // string used for unique identification of rule within labeling

std::unique_ptr<QgsExpression> mFilter;

0 comments on commit 0e2ceb9

Please sign in to comment.
You can’t perform that action at this time.