Skip to content

Commit

Permalink
Use correct approach to unset data defined field for label position
Browse files Browse the repository at this point in the history
when auxiliary column is removed

Refs #46403
  • Loading branch information
nyalldawson committed Feb 2, 2022
1 parent 6cf6d52 commit 20c289e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/gui/qgstextformatwidget.cpp
Expand Up @@ -1151,12 +1151,9 @@ void QgsTextFormatWidget::deactivateField( QgsPalLayerSettings::Property key )
if ( mButtons.contains( key ) )
{
QgsPropertyOverrideButton *button = mButtons[ key ];
QgsProperty p = button->toProperty();
p.setField( QString() );
p.setActive( false );
button->updateFieldLists();
button->setToProperty( p );
mDataDefinedProperties.setProperty( key, p );
button->setToProperty( QgsProperty() );
mDataDefinedProperties.setProperty( key, QgsProperty() );
}
}

Expand Down

0 comments on commit 20c289e

Please sign in to comment.