MCPcopy Create free account
hub / github.com/davy7125/polyphone / commitActionSet

Method commitActionSet

sources/core/actionmanager.cpp:46–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46QList<int> ActionManager::commitActionSet()
47{
48 if (_currentActions.empty())
49 return QList<int>(); // Nothing to do
50
51 // Separate the actions per soundfont
52 QMap<int, QList<Action *> > actionsPerSoundfont;
53 while (!_currentActions.isEmpty())
54 {
55 Action * action = _currentActions.takeFirst();
56 actionsPerSoundfont[action->id.indexSf2] << action;
57 }
58
59 // Add the new sets of actions
60 foreach (int sf2Index, actionsPerSoundfont.keys())
61 {
62 if (!_actionSets.contains(sf2Index))
63 {
64 _actionSets[sf2Index] = new ActionSet();
65 connect(_actionSets[sf2Index], SIGNAL(dropId(EltID)), this, SIGNAL(dropId(EltID)));
66 }
67 _actionSets[sf2Index]->addActions(actionsPerSoundfont[sf2Index]);
68 }
69
70 return actionsPerSoundfont.keys();
71}
72
73void ActionManager::clearCurrentActionSet()
74{

Callers 1

endEditingMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected