File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
include/sst/jucegui/components
src/sst/jucegui/components Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ struct ListView : public juce::Component,
8080 void rowSelected (uint32_t r, bool select, const juce::ModifierKeys &mods);
8181 static SelectionAddAction selectionAddActionForModifier (const juce::ModifierKeys &);
8282
83+ void reassignAllComponents ();
84+
8385 std::function<uint32_t ()> getRowCount{nullptr };
8486 std::function<uint32_t ()> getRowHeight{nullptr };
8587 std::function<std::unique_ptr<juce::Component>()> makeRowComponent{nullptr };
Original file line number Diff line number Diff line change @@ -96,6 +96,16 @@ void ListView::refresh()
9696 repaint ();
9797}
9898
99+ void ListView::reassignAllComponents ()
100+ {
101+ uint32_t idx{0 };
102+ for (const auto &c : innards->components )
103+ {
104+ assignComponentToRow (c, idx);
105+ idx++;
106+ }
107+ }
108+
99109void ListView::rowSelected (uint32_t r, bool b, const juce::ModifierKeys &mods)
100110{
101111 if (mods.isShiftDown ())
You can’t perform that action at this time.
0 commit comments