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 github-actions committed Jul 16, 2021
1 parent 67a5aee commit 6c3180e0997b0008d15a3deea2f558cc156e2741
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 6c3180e

Please sign in to comment.