Skip to content

Commit

Permalink
[raster] allow multiple row deletion in the singleband pseudo-color UI
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Dec 9, 2016
1 parent 364a51d commit 4894a6d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp
Expand Up @@ -315,10 +315,16 @@ void QgsSingleBandPseudoColorRendererWidget::on_mAddEntryButton_clicked()

void QgsSingleBandPseudoColorRendererWidget::on_mDeleteEntryButton_clicked()
{
QTreeWidgetItem* currentItem = mColormapTreeWidget->currentItem();
if ( currentItem )
QList<QTreeWidgetItem *> itemList;
itemList = mColormapTreeWidget->selectedItems();
if ( itemList.isEmpty() )
{
return;
}

Q_FOREACH ( QTreeWidgetItem *item, itemList )
{
delete currentItem;
delete item;
}
emit widgetChanged();
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/qgssinglebandpseudocolorrendererwidgetbase.ui
Expand Up @@ -127,7 +127,7 @@
<item>
<widget class="QPushButton" name="mDeleteEntryButton">
<property name="toolTip">
<string>Remove selected row</string>
<string>Remove selected row(s)</string>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
Expand Down

0 comments on commit 4894a6d

Please sign in to comment.