Browse Source

Added multi-select to the PluginListComponent.

tags/2021-05-28
jules 11 years ago
parent
commit
874814eaa0
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp

+ 4
- 3
modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp 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);
}


Loading…
Cancel
Save