Skip to content
Permalink
Browse files

Simplify use of aux field for callout properties

Instead of prompting users for an aux field name and type, just
immediately create the field when the option is selected (like
we do for other label properties)
  • Loading branch information
nyalldawson committed Mar 12, 2021
1 parent 8bacaa5 commit 99e2566e6013ddf4c10238282636170ab2d502c4
Showing with 1 addition and 7 deletions.
  1. +1 −7 src/gui/callouts/qgscalloutwidget.cpp
@@ -97,15 +97,9 @@ void QgsCalloutWidget::createAuxiliaryField()
// create property in auxiliary storage if necessary
if ( !mVectorLayer->auxiliaryLayer()->exists( def ) )
{
QgsNewAuxiliaryFieldDialog dlg( def, mVectorLayer, true, this );
if ( dlg.exec() == QDialog::Accepted )
def = dlg.propertyDefinition();
mVectorLayer->auxiliaryLayer()->addAuxiliaryField( def );
}

// return if still not exist
if ( !mVectorLayer->auxiliaryLayer()->exists( def ) )
return;

// update property with join field name from auxiliary storage
QgsProperty property = button->toProperty();
property.setField( QgsAuxiliaryLayer::nameFromProperty( def, true ) );

0 comments on commit 99e2566

Please sign in to comment.