Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[labeling] Fix handling of data-defined buffers (both UI/UX and rende…
- Loading branch information
|
@@ -186,6 +186,7 @@ void QgsLabelPropertyDialog::init( const QString &layerId, const QString &provid |
|
|
mYCoordSpinBox->clear(); |
|
|
|
|
|
mShowLabelChkbx->setChecked( true ); |
|
|
mBufferDrawChkbx->setChecked( buffer.enabled() ); |
|
|
mFontColorButton->setColor( format.color() ); |
|
|
mBufferColorButton->setColor( buffer.color() ); |
|
|
mMinScaleWidget->setScale( layerSettings.minimumScale ); |
|
|
|
@@ -3066,7 +3066,6 @@ void QgsPalLayerSettings::parseTextBuffer( QgsRenderContext &context ) |
|
|
} |
|
|
else if ( mDataDefinedProperties.isActive( QgsPalLayerSettings::BufferDraw ) && exprVal.isNull() ) |
|
|
{ |
|
|
drawBuffer = false; |
|
|
dataDefinedValues.insert( QgsPalLayerSettings::BufferDraw, QVariant( drawBuffer ) ); |
|
|
} |
|
|
|
|
|
|
@@ -32,6 +32,7 @@ |
|
|
#include "callouts/qgscalloutwidget.h" |
|
|
#include "qgslabelobstaclesettingswidget.h" |
|
|
#include "qgslabellineanchorwidget.h" |
|
|
|
|
|
#include <mutex> |
|
|
|
|
|
#include <QButtonGroup> |
|
@@ -242,6 +243,7 @@ QgsLabelingGui::QgsLabelingGui( QgsVectorLayer *layer, QgsMapCanvas *mapCanvas, |
|
|
|
|
|
// connections for groupboxes with separate activation checkboxes (that need to honor data defined setting) |
|
|
connect( mBufferDrawChkBx, &QAbstractButton::toggled, this, &QgsLabelingGui::updateUi ); |
|
|
connect( mBufferDrawDDBtn, &QgsPropertyOverrideButton::changed, this, &QgsLabelingGui::updateUi ); |
|
|
connect( mEnableMaskChkBx, &QAbstractButton::toggled, this, &QgsLabelingGui::updateUi ); |
|
|
connect( mShapeDrawChkBx, &QAbstractButton::toggled, this, &QgsLabelingGui::updateUi ); |
|
|
connect( mCalloutsDrawCheckBox, &QAbstractButton::toggled, this, &QgsLabelingGui::updateUi ); |
|
@@ -625,11 +627,7 @@ QgsPalLayerSettings QgsLabelingGui::layerSettings() |
|
|
|
|
|
void QgsLabelingGui::syncDefinedCheckboxFrame( QgsPropertyOverrideButton *ddBtn, QCheckBox *chkBx, QFrame *f ) |
|
|
{ |
|
|
if ( ddBtn->isActive() && !chkBx->isChecked() ) |
|
|
{ |
|
|
chkBx->setChecked( true ); |
|
|
} |
|
|
f->setEnabled( chkBx->isChecked() ); |
|
|
f->setEnabled( chkBx->isChecked() || ddBtn->isActive() ); |
|
|
} |
|
|
|
|
|
bool QgsLabelingGui::eventFilter( QObject *object, QEvent *event ) |
|
|
|
@@ -707,7 +707,6 @@ void QgsTextFormatWidget::populateDataDefinedButtons() |
|
|
|
|
|
// text buffer |
|
|
registerDataDefinedButton( mBufferDrawDDBtn, QgsPalLayerSettings::BufferDraw ); |
|
|
mBufferDrawDDBtn->registerCheckedWidget( mBufferDrawChkBx ); |
|
|
registerDataDefinedButton( mBufferSizeDDBtn, QgsPalLayerSettings::BufferSize ); |
|
|
registerDataDefinedButton( mBufferUnitsDDBtn, QgsPalLayerSettings::BufferUnit ); |
|
|
registerDataDefinedButton( mBufferColorDDBtn, QgsPalLayerSettings::BufferColor ); |
|
|