decoupling achieved. compiles. doesn't immediately explode. but neither banks nor presets visible.

This commit is contained in:
Alex Birch
2019-07-14 17:22:36 +01:00
parent 58574425f3
commit 8c1be957fe
9 changed files with 183 additions and 146 deletions

View File

@ -17,7 +17,7 @@ using namespace Util;
This class shows how to implement a TableListBoxModel to show in a TableListBox.
*/
TableComponent::TableComponent(
AudioProcessorValueTreeState& valueTreeState,
AudioProcessorValueTreeState& valueTreeState
// const vector<string> &columns,
// const vector<TableRow> &rows,
// const function<void (int)> &onRowSelected,
@ -74,7 +74,8 @@ TableComponent::TableComponent(
table.setWantsKeyboardFocus(false);
// table.selectRow();
loadModelFrom(valueTreeState.state.getChildWithName("presets"));
ValueTree presets{valueTreeState.state.getChildWithName("presets")};
loadModelFrom(presets);
// selectCurrentPreset();
// we could now change some initial settings..
@ -160,9 +161,9 @@ void TableComponent::paintRowBackground (
String TableRow::getStringContents(int columnId) {
if (columnId <= 1) {
return String(row.preset);
return String(preset);
}
return row.name;
return name;
}
// This is overloaded from TableListBoxModel, and must paint any cells that aren't using custom