Skip to content

Commit

Permalink
Fix a crash in Symbol properties dialog when removed a layer. (#2995)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@14553 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Nov 12, 2010
1 parent be0aef5 commit 06305bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/symbology-ng/qgssymbolv2propertiesdialog.cpp
Expand Up @@ -355,11 +355,16 @@ void QgsSymbolV2PropertiesDialog::removeLayer()
{
int idx = currentLayerIndex();
if ( idx < 0 ) return;
int row = currentRowIndex();
mSymbol->deleteSymbolLayer( idx );

loadSymbol();

updateUi();

// set previous layer as active
QModelIndex newIndex = listLayers->model()->index( qMin(row, mSymbol->symbolLayerCount()-1), 0 );
listLayers->setCurrentIndex( newIndex );
}


Expand Down

0 comments on commit 06305bc

Please sign in to comment.