fix creation of TempoCommands for undo/redo history

This commit is contained in:
Paul Davis 2022-04-08 11:57:16 -06:00
parent 7fd8544e31
commit 9c4024ff0c
2 changed files with 5 additions and 5 deletions

View File

@ -110,12 +110,8 @@ Session::memento_command_factory(XMLNode *n)
} else if (type_name == "ARDOUR::Locations") {
return new MementoCommand<Locations>(*_locations, before, after);
} else if (type_name == "Temporal::TempoMap") {
#warning NUTEMPO how to reconstruct memento commands for a tempo map
// return new MementoCommand<TempoMap>(*TempoMap::fetch(), before, after);
} else if (type_name == "ARDOUR::Playlist" || type_name == "ARDOUR::AudioPlaylist" || type_name == "ARDOUR::MidiPlaylist") {
if (boost::shared_ptr<Playlist> pl = _playlists->by_name(child->property("name")->value())) {
return new MementoCommand<Playlist>(*(pl.get()), before, after);
}

View File

@ -4045,6 +4045,10 @@ Session::restore_history (string snapshot_name)
ut->add_command(c);
}
} else if (n->name() == "TempoCommand") {
ut->add_command (new TempoCommand (*n));
} else if (n->name() == "NoteDiffCommand") {
PBD::ID id (n->property("midi-source")->value());
boost::shared_ptr<MidiSource> midi_source =