Skip to content

Commit 6829b5f

Browse files
author
wonder
committedOct 22, 2010
Fix a crash (#3147)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14427 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/gui/symbology-ng/qgssymbolv2propertiesdialog.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,10 @@ void QgsSymbolV2PropertiesDialog::populateLayerTypes()
169169
void QgsSymbolV2PropertiesDialog::updateUi()
170170
{
171171
int row = currentRowIndex();
172+
int count = listLayers->model()->rowCount();
172173
btnUp->setEnabled( row > 0 );
173-
btnDown->setEnabled( row < listLayers->model()->rowCount() - 1 && row != -1 );
174-
btnRemoveLayer->setEnabled( row != -1 );
174+
btnDown->setEnabled( row < count - 1 && row != -1 );
175+
btnRemoveLayer->setEnabled( count > 1 && row != -1 );
175176
}
176177

177178
void QgsSymbolV2PropertiesDialog::updatePreview()

0 commit comments

Comments
 (0)
Please sign in to comment.