Skip to content
Permalink
Browse files
Fix incorrect symbol size units shown when first showing the symbol w…
…idget

We need to populate the combo box with all valid size units before trying
to set the unit for the combo

Fixes #44070
  • Loading branch information
nyalldawson authored and nirvn committed Jul 19, 2021
1 parent 935f45c commit a2a6df2f8b4228fc8bb3f20311c3cc283a8f96ba
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/gui/symbology/qgssymbolslistwidget.cpp
@@ -104,15 +104,15 @@ QgsSymbolsListWidget::QgsSymbolsListWidget( QgsSymbol *symbol, QgsStyle *style,

stackedWidget->setCurrentIndex( 0 );

mSymbolUnitWidget->setUnits( QgsUnitTypes::RenderUnitList() << QgsUnitTypes::RenderMillimeters << QgsUnitTypes::RenderMetersInMapUnits << QgsUnitTypes::RenderMapUnits << QgsUnitTypes::RenderPixels
<< QgsUnitTypes::RenderPoints << QgsUnitTypes::RenderInches );

if ( mSymbol )
{
updateSymbolInfo();
}

connect( mSymbolUnitWidget, &QgsUnitSelectionWidget::changed, this, &QgsSymbolsListWidget::mSymbolUnitWidget_changed );
mSymbolUnitWidget->setUnits( QgsUnitTypes::RenderUnitList() << QgsUnitTypes::RenderMillimeters << QgsUnitTypes::RenderMetersInMapUnits << QgsUnitTypes::RenderMapUnits << QgsUnitTypes::RenderPixels
<< QgsUnitTypes::RenderPoints << QgsUnitTypes::RenderInches );

connect( mSymbolColorButton, &QgsColorButton::colorChanged, this, &QgsSymbolsListWidget::setSymbolColor );

registerSymbolDataDefinedButton( opacityDDBtn, QgsSymbol::PropertyOpacity );

0 comments on commit a2a6df2

Please sign in to comment.