Skip to content

Commit

Permalink
Fix a crash (#3147)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@14427 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Oct 22, 2010
1 parent 9cfd7cb commit 9f7ed1e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/symbology-ng/qgssymbolv2propertiesdialog.cpp
Original file line number Diff line number Diff line change
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 9f7ed1e

Please sign in to comment.