Skip to content

Commit

Permalink
Avoid duplicate 'follow label placement' options in combo box
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 8, 2016
1 parent 6c0afcd commit ea3fc65
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/qgslabelinggui.cpp
Expand Up @@ -590,7 +590,14 @@ void QgsLabelingGui::init()
if ( mLayer->geometryType() == QGis::Point )
{
// follow placement alignment is only valid for point layers
mFontMultiLineAlignComboBox->addItem( tr( "Follow label placement" ) );
if ( mFontMultiLineAlignComboBox->findText( tr( "Follow label placement" ) ) == -1 )
mFontMultiLineAlignComboBox->addItem( tr( "Follow label placement" ) );
}
else
{
int idx = mFontMultiLineAlignComboBox->findText( tr( "Follow label placement" ) );
if ( idx >= 0 )
mFontMultiLineAlignComboBox->removeItem( idx );
}

// load labeling settings from layer
Expand Down

0 comments on commit ea3fc65

Please sign in to comment.