Skip to content

Commit cb26c7b

Browse files
fixed wrong order
1 parent 871b441 commit cb26c7b

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

manim_editor/editor/create_project.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from typing import List, Tuple
66

77
from .manim_loader import get_scenes
8-
from .presentation_classes import Section, Slide
8+
from .presentation_classes import Scene, Section, Slide
99

1010
__all__ = ["create_project_dir", "populate_project_with_loaded_sections", "populate_project"]
1111

@@ -64,7 +64,9 @@ def populate_project(project_name: str, scene_ids: List[int]) -> bool:
6464
"""
6565
print(f"Populating project '{project_name}'.")
6666
# select scenes according to ids set by frontend
67-
scenes = [scene for scene in get_scenes() if scene.id in scene_ids]
67+
scenes_raw = get_scenes()
68+
scenes = [scenes_raw[scene_id] for scene_id in scene_ids]
69+
6870
sections: List[Section] = []
6971
for scene in scenes:
7072
sections += scene.sections

web_src/ts/presenter/presentation.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ export abstract class Presentation {
9595
case SectionType.SKIP:
9696
next_element.onended = (_) => {
9797
// immediately go to next section without user input
98-
++this.current_section;
99-
this.next_section = this.current_section;
100-
this.set_time_stamp();
101-
this.update_video();
98+
this.play_section(this.current_section + 1, true);
10299
}
103100
break;
104101
case SectionType.LOOP:
@@ -112,9 +109,7 @@ export abstract class Presentation {
112109
next_element.onended = (_) => {
113110
// when next section has changed, go to next one
114111
// otherwise restart
115-
this.current_section = this.next_section;
116-
this.set_time_stamp();
117-
this.update_video();
112+
this.play_section(this.next_section, true);
118113
}
119114
break;
120115
// SectionType.NORMAL

0 commit comments

Comments
 (0)