Skip to content

Commit

Permalink
Fix incorrect symbol size units shown when first showing the symbol w…
Browse files Browse the repository at this point in the history
…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 fafc962
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/symbology/qgssymbolslistwidget.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit fafc962

Please sign in to comment.