Skip to content

Commit

Permalink
Simplify use of aux field for callout properties
Browse files Browse the repository at this point in the history
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 99e2566
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/gui/callouts/qgscalloutwidget.cpp
Expand Up @@ -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 ) );
Expand Down

0 comments on commit 99e2566

Please sign in to comment.