Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix a crash (#3147)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14427 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Oct 22, 2010
1 parent ae067b7 commit 6829b5f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/symbology-ng/qgssymbolv2propertiesdialog.cpp
Expand Up @@ -169,9 +169,10 @@ void QgsSymbolV2PropertiesDialog::populateLayerTypes()
void QgsSymbolV2PropertiesDialog::updateUi()
{
int row = currentRowIndex();
int count = listLayers->model()->rowCount();
btnUp->setEnabled( row > 0 );
btnDown->setEnabled( row < listLayers->model()->rowCount() - 1 && row != -1 );
btnRemoveLayer->setEnabled( row != -1 );
btnDown->setEnabled( row < count - 1 && row != -1 );
btnRemoveLayer->setEnabled( count > 1 && row != -1 );
}

void QgsSymbolV2PropertiesDialog::updatePreview()
Expand Down

0 comments on commit 6829b5f

Please sign in to comment.