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 callouts (both UI/UX and rend…
- Loading branch information
|
@@ -16,6 +16,7 @@ |
|
|
***************************************************************************/ |
|
|
|
|
|
#include "qgslabelpropertydialog.h" |
|
|
#include "qgscallout.h" |
|
|
#include "qgsfontutils.h" |
|
|
#include "qgslogger.h" |
|
|
#include "qgsfeatureiterator.h" |
|
@@ -187,6 +188,7 @@ void QgsLabelPropertyDialog::init( const QString &layerId, const QString &provid |
|
|
|
|
|
mShowLabelChkbx->setChecked( true ); |
|
|
mBufferDrawChkbx->setChecked( buffer.enabled() ); |
|
|
mShowCalloutChkbx->setChecked( layerSettings.callout() ? layerSettings.callout()->enabled() : false ); |
|
|
mFontColorButton->setColor( format.color() ); |
|
|
mBufferColorButton->setColor( buffer.color() ); |
|
|
mMinScaleWidget->setScale( layerSettings.minimumScale ); |
|
|
|
@@ -117,9 +117,6 @@ QgsCallout::DrawOrder QgsCallout::drawOrder() const |
|
|
|
|
|
void QgsCallout::render( QgsRenderContext &context, QRectF rect, const double angle, const QgsGeometry &anchor, QgsCalloutContext &calloutContext ) |
|
|
{ |
|
|
if ( !mEnabled ) |
|
|
return; |
|
|
|
|
|
#if 0 // for debugging |
|
|
QPainter *painter = context.painter(); |
|
|
painter->save(); |
|
|
|
@@ -468,7 +468,7 @@ void QgsTextFormatWidget::initWidget() |
|
|
{ |
|
|
updateShadowFrameStatus(); |
|
|
} ); |
|
|
connect( mCalloutDrawDDBtn, &QgsPropertyOverrideButton::activated, this, &QgsTextFormatWidget::updateCalloutFrameStatus ); |
|
|
connect( mCalloutDrawDDBtn, &QgsPropertyOverrideButton::changed, this, &QgsTextFormatWidget::updateCalloutFrameStatus ); |
|
|
connect( mCalloutsDrawCheckBox, &QCheckBox::stateChanged, this, [ = ]( int ) |
|
|
{ |
|
|
updateCalloutFrameStatus(); |
|
@@ -809,7 +809,6 @@ void QgsTextFormatWidget::populateDataDefinedButtons() |
|
|
registerDataDefinedButton( mZIndexDDBtn, QgsPalLayerSettings::ZIndex ); |
|
|
|
|
|
registerDataDefinedButton( mCalloutDrawDDBtn, QgsPalLayerSettings::CalloutDraw ); |
|
|
mCalloutDrawDDBtn->registerCheckedWidget( mCalloutsDrawCheckBox ); |
|
|
|
|
|
registerDataDefinedButton( mLabelAllPartsDDBtn, QgsPalLayerSettings::LabelAllParts ); |
|
|
} |
|
|