Skip to content
Permalink
Browse files

Fix a crash in Symbol properties dialog when removed a layer. (#2995)

git-svn-id: http://svn.osgeo.org/qgis/trunk@14553 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Nov 12, 2010
1 parent be0aef5 commit 06305bc433cee70417eac96f28e91a755d42a1e4
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/gui/symbology-ng/qgssymbolv2propertiesdialog.cpp
@@ -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 );
}


0 comments on commit 06305bc

Please sign in to comment.
You can’t perform that action at this time.