Entire cleanup of ActionManager

History of previous id of sources is now obtained in SessionLoader; no
need to store the id of the source in action manager XML (so also
removed in View current id).
This commit is contained in:
brunoherbelin
2021-03-19 23:09:49 +01:00
parent b07009f3ce
commit 112b583379
11 changed files with 86 additions and 115 deletions

View File

@@ -34,7 +34,7 @@ void Action::clear()
store("Session start");
}
void Action::store(const std::string &label, uint64_t id)
void Action::store(const std::string &label)
{
// ignore if locked or if no label is given
if (locked_ || label.empty())
@@ -58,8 +58,6 @@ void Action::store(const std::string &label, uint64_t id)
xmlDoc_.InsertEndChild(sessionNode);
// label describes the action
sessionNode->SetAttribute("label", label.c_str());
// id indicates which object was modified
sessionNode->SetAttribute("id", id);
// view indicates the view when this action occured
sessionNode->SetAttribute("view", (int) Mixer::manager().view()->mode());
@@ -104,24 +102,11 @@ void Action::stepTo(uint target)
// get reasonable target
uint t = CLAMP(target, 1, max_step_);
// going backward
if ( t < step_ ) {
// go back one step at a time
while (t < step_)
undo();
}
// step forward
else if ( t > step_ ) {
// go forward one step at a time
while (t > step_)
redo();
}
// ignore t == step_
// restore(t);
if (t != step_)
restore(t);
}
std::string Action::label(uint s) const
{
std::string l = "";