MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / restoreSavedState

Method restoreSavedState

Source/Core/CtrlrPanel/CtrlrPanelResourceManager.cpp:29–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void CtrlrPanelResourceManager::restoreSavedState (const ValueTree &savedState)
30{
31 for (int i=0; i<savedState.getNumChildren(); i++)
32 {
33 if (savedState.getChild(i).hasType(Ids::resource))
34 {
35 CtrlrPanelResource *res = getResource(savedState.getChild(i).getProperty(Ids::resourceName).toString());
36 if (res)
37 {
38 res->setProperty (Ids::resourceSourceFile, savedState.getChild(i).getProperty(Ids::resourceSourceFile));
39 }
40 }
41 }
42}
43
44void CtrlrPanelResourceManager::initManager()
45{

Callers 1

restoreStateMethod · 0.80

Calls 5

getNumChildrenMethod · 0.80
getChildMethod · 0.45
toStringMethod · 0.45
getPropertyMethod · 0.45
setPropertyMethod · 0.45

Tested by

no test coverage detected