1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-13 00:04:19 +00:00

Added multi-select to the PluginListComponent.

This commit is contained in:
jules 2014-01-20 19:01:17 +00:00
parent 28c281c6d3
commit 874814eaa0

View file

@ -83,9 +83,9 @@ public:
}
}
void deleteKeyPressed (int lastRowSelected) override
void deleteKeyPressed (int) override
{
removePluginItem (list, lastRowSelected);
owner.removeSelected();
}
void sortOrderChanged (int newSortColumnId, bool isForwards) override
@ -152,6 +152,7 @@ PluginListComponent::PluginListComponent (AudioPluginFormatManager& manager, Kno
table.setHeaderHeight (22);
table.setRowHeight (20);
table.setModel (tableModel);
table.setMultipleSelectionEnabled (true);
addAndMakeVisible (table);
addAndMakeVisible (optionsButton);
@ -208,7 +209,7 @@ void PluginListComponent::removeSelected()
{
const SparseSet<int> selected (table.getSelectedRows());
for (int i = list.getNumTypes(); --i >= 0;)
for (int i = table.getNumRows(); --i >= 0;)
if (selected.contains (i))
TableModel::removePluginItem (list, i);
}