Skip to content

Commit

Permalink
Fix regression where enable/disable list items does not reflect in UI (
Browse files Browse the repository at this point in the history
  • Loading branch information
stonepreston authored Jun 4, 2022
1 parent 148c9d6 commit 440876d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,15 @@ void EditItemListViewModel::valueTreeChildRemoved(
markAndUpdate(shouldUpdateItems);
}

void EditItemListViewModel::valueTreePropertyChanged(
juce::ValueTree &treeWhosePropertyHasChanged,
const juce::Identifier &property) {
if (childIdentifiersOfInterest.contains(
treeWhosePropertyHasChanged.getType())) {
if (property == tracktion_engine::IDs::enabled) {
markAndUpdate(shouldUpdateItems);
}
}
}

} // namespace app_view_models
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class EditItemListViewModel : public juce::ValueTree::Listener,
void valueTreeChildRemoved(juce::ValueTree &parentTree,
juce::ValueTree &childWhichHasBeenRemoved,
int indexFromWhichChildWasRemoved) override;
void valueTreePropertyChanged(juce::ValueTree &treeWhosePropertyHasChanged,
const juce::Identifier &property) override;

public:
ItemListState itemListState;
Expand Down

0 comments on commit 440876d

Please sign in to comment.