Skip to content

Commit

Permalink
fix for #6273
Browse files Browse the repository at this point in the history
  • Loading branch information
Arunmozhi authored and NathanW2 committed Oct 5, 2012
1 parent efb2329 commit 41d306b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/gui/symbology-ng/qgsstylev2managerdialog.cpp
Expand Up @@ -669,12 +669,14 @@ void QgsStyleV2ManagerDialog::removeItem()

bool QgsStyleV2ManagerDialog::removeSymbol()
{
QString symbolName = currentItemName();
if ( symbolName.isEmpty() )
return false;

// delete from style and update list
mStyle->removeSymbol( symbolName );
QModelIndexList indexes = listItems->selectionModel()->selectedIndexes();
foreach( QModelIndex index, indexes )
{
QString symbolName = index.data().toString();
// delete from style and update list
if ( !symbolName.isEmpty() )
mStyle->removeSymbol( symbolName );
}
mModified = true;
return true;
}
Expand Down Expand Up @@ -1294,7 +1296,7 @@ void QgsStyleV2ManagerDialog::listitemsContextMenu( const QPoint& point )
{
groupId = mStyle->groupId( selectedItem->text() );
}
QModelIndexList indexes = listItems->selectionModel()->selection().indexes();
QModelIndexList indexes = listItems->selectionModel()->selectedIndexes();
foreach ( QModelIndex index, indexes )
{
mStyle->group( type, index.data().toString(), groupId );
Expand Down

0 comments on commit 41d306b

Please sign in to comment.