Skip to content

Commit 41d306b

Browse files
ArunmozhiNathanW2
authored andcommitted
fix for #6273
1 parent efb2329 commit 41d306b

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

‎src/gui/symbology-ng/qgsstylev2managerdialog.cpp‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -669,12 +669,14 @@ void QgsStyleV2ManagerDialog::removeItem()
669669

670670
bool QgsStyleV2ManagerDialog::removeSymbol()
671671
{
672-
QString symbolName = currentItemName();
673-
if ( symbolName.isEmpty() )
674-
return false;
675-
676-
// delete from style and update list
677-
mStyle->removeSymbol( symbolName );
672+
QModelIndexList indexes = listItems->selectionModel()->selectedIndexes();
673+
foreach( QModelIndex index, indexes )
674+
{
675+
QString symbolName = index.data().toString();
676+
// delete from style and update list
677+
if ( !symbolName.isEmpty() )
678+
mStyle->removeSymbol( symbolName );
679+
}
678680
mModified = true;
679681
return true;
680682
}
@@ -1294,7 +1296,7 @@ void QgsStyleV2ManagerDialog::listitemsContextMenu( const QPoint& point )
12941296
{
12951297
groupId = mStyle->groupId( selectedItem->text() );
12961298
}
1297-
QModelIndexList indexes = listItems->selectionModel()->selection().indexes();
1299+
QModelIndexList indexes = listItems->selectionModel()->selectedIndexes();
12981300
foreach ( QModelIndex index, indexes )
12991301
{
13001302
mStyle->group( type, index.data().toString(), groupId );

0 commit comments

Comments
 (0)