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 authored and github-actions[bot] committed Jul 16, 2021
1 parent 67a5aee commit 6c3180e
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 6c3180e

Please sign in to comment.