mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-28 12:07:48 -06:00
#1714: doc comments name the saved current times
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
b9172fec2f
commit
ea67c46880
@@ -984,16 +984,17 @@ impl Session {
|
||||
self.events.push(Event::OpenComp(id));
|
||||
}
|
||||
|
||||
/// The open compositions, as a project file records them ([`effectcraft_project::SavedView`]).
|
||||
/// The open compositions and their current times, as a project file records them
|
||||
/// ([`effectcraft_project::SavedView`]).
|
||||
pub fn saved_view(&self) -> effectcraft_project::SavedView {
|
||||
let comp_times = self.state.times.iter().filter(|(id, _)| self.project.comp(**id).is_some()).map(|(id, t)| (*id, *t)).collect();
|
||||
effectcraft_project::SavedView { active_comp: self.state.active_comp, open_comps: self.state.open_comps.clone(), comp_times }
|
||||
}
|
||||
|
||||
/// Reopen the compositions a project file was saved with (#748), each at its saved current
|
||||
/// time (#1714). Ids that no longer name a
|
||||
/// comp are skipped; with none left the project stays on the comp [`Session::replace_project`]
|
||||
/// opened (its first), as files from before the view was saved do.
|
||||
/// time (#1714). Ids that no longer name a comp are skipped; with none left the project stays
|
||||
/// on the comp [`Session::replace_project`] opened (its first), as files from before the view
|
||||
/// was saved do.
|
||||
pub fn restore_view(&mut self, view: &effectcraft_project::SavedView) {
|
||||
for (id, t) in &view.comp_times {
|
||||
if let Some(comp) = self.project.comp(*id) {
|
||||
|
||||
Reference in New Issue
Block a user