mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
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
This commit is contained in:
parent
be0aef5d2e
commit
06305bc433
@ -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 );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user