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 committed Jul 16, 2021
1 parent 677c14d commit fafc962564c26a3c11dbad527795edfb696d35aa
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 fafc962

Please sign in to comment.