MCPcopy Create free account
hub / github.com/christophhart/HISE / SelectionUpdater

Method SelectionUpdater

hi_scripting/scripting/scriptnode/api/DspNetwork.cpp:1723–1751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1721}
1722
1723DspNetwork::SelectionUpdater::SelectionUpdater(DspNetwork& parent_) :
1724 parent(parent_)
1725{
1726 WeakReference<DspNetwork> weakParent = &parent;
1727
1728 auto f = [weakParent, this]()
1729 {
1730 if (weakParent != nullptr)
1731 weakParent.get()->selection.addChangeListener(this);
1732 };
1733
1734 MessageManager::callAsync(f);
1735
1736#if 0
1737 deleteChecker.setCallback(parent.data, valuetree::AsyncMode::Asynchronously,
1738 [this](ValueTree v, bool wasAdded)
1739 {
1740 if (!wasAdded)
1741 {
1742 if (auto nodeThatWasRemoved = parent.getNodeForValueTree(v))
1743 {
1744 parent.deselect(nodeThatWasRemoved);
1745 }
1746 }
1747 });
1748
1749 deleteChecker.setTypeToWatch(PropertyIds::Nodes);
1750#endif
1751}
1752
1753DspNetwork::SelectionUpdater::~SelectionUpdater()
1754{

Callers

nothing calls this directly

Calls 6

getNodeForValueTreeMethod · 0.80
setTypeToWatchMethod · 0.80
addChangeListenerMethod · 0.45
getMethod · 0.45
setCallbackMethod · 0.45
deselectMethod · 0.45

Tested by

no test coverage detected