From a027307d0210f99ec196eb06f38e85406cfe8583 Mon Sep 17 00:00:00 2001 From: Mathieu Pellerin Date: Sun, 2 Feb 2025 15:48:24 +0700 Subject: [PATCH] [annotations][ui] Fix fixed-size unit combo box not set when editing a rectangle text annotation --- src/gui/annotations/qgsannotationitemwidget_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/annotations/qgsannotationitemwidget_impl.cpp b/src/gui/annotations/qgsannotationitemwidget_impl.cpp index 82a90e55167d..0c73c750f309 100644 --- a/src/gui/annotations/qgsannotationitemwidget_impl.cpp +++ b/src/gui/annotations/qgsannotationitemwidget_impl.cpp @@ -594,7 +594,6 @@ QgsAnnotationRectangleTextItemWidget::QgsAnnotationRectangleTextItemWidget( QWid mSizeUnitWidget->setUnits( QgsUnitTypes::RenderUnitList() << Qgis::RenderUnit::Pixels << Qgis::RenderUnit::Millimeters << Qgis::RenderUnit::Points << Qgis::RenderUnit::Inches << Qgis::RenderUnit::Percentage ); - mBackgroundSymbolButton->setSymbolType( Qgis::SymbolType::Fill ); mBackgroundSymbolButton->setDialogTitle( tr( "Background" ) ); mBackgroundSymbolButton->registerExpressionContextGenerator( this ); @@ -753,6 +752,7 @@ bool QgsAnnotationRectangleTextItemWidget::setNewItem( QgsAnnotationItem *item ) mWidthSpinBox->setValue( textItem->fixedSize().width() ); mHeightSpinBox->setValue( textItem->fixedSize().height() ); + mSizeUnitWidget->setUnit( textItem->fixedSizeUnit() ); mSizeModeCombo->setCurrentIndex( mSizeModeCombo->findData( QVariant::fromValue( textItem->placementMode() ) ) ); mBlockChangedSignal = false;