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 Jan 31, 2022
1 parent 6e435a6 commit adacc90
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/gui/qgstextformatwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1175,12 +1175,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 adacc90

Please sign in to comment.