Skip to content

fix(present): not reversing to previous scene - #671

Merged
jeertmans merged 3 commits into
jeertmans:mainfrom
wuerfelfreak:reversed_reduce_presenation_index_fix
Sep 3, 2026
Merged

jeertmans merged 3 commits into
jeertmans:mainfrom
wuerfelfreak:reversed_reduce_presenation_index_fix

Conversation

@wuerfelfreak

Copy link
Copy Markdown
Contributor

Fixes Issue

When present is called with multiple scenes (e.g. manim-slides Scene1 Scene2) and is advanced to the second scene it is not possible to get back to the first scene by pressing the reverse button. As soon as the first slide of the second slide is reached by pressing the reverse button, further presses only restart the animation. Pressing the previous_slide button however does work to get back to the first scene.

This is because reverse checks if current_slide_index >= 1 but does not consider that current_presentation_index might be > 0.

@Slot()
def reverse(self) -> None:
    if self.playing_reversed_slide and self.current_slide_index >= 1:
        self.current_slide_index -= 1

    self.load_reversed_slide()
    self.preview_next_slide()

Description

load_previous_slide already correctly implements the boundary check. Therefore I reused the implementation of load_previous_slide. To do that I moved the assignment of self.playing_reversed_slide to reverse and previous and then called load_previous_slide from both, eliminating load_reversed_slide in the process.

Check List

Check all the applicable boxes:

  • I understand that my contributions needs to pass the checks;
  • If I created new functions / methods, I documented them and add type hints;
  • If I modified already existing code, I updated the documentation accordingly;
  • The title of my pull request is a short description of the requested changes.

@github-actions github-actions Bot added waiting review Waiting review (or response) by a maintainer waiting triage This issue or PR needs to be labeled accordingly. labels Aug 24, 2026
@codacy-production

codacy-production Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov

codecov Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.24%. Comparing base (c6c134b) to head (ce4262f).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
manim_slides/present/player.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #671      +/-   ##
==========================================
+ Coverage   79.10%   79.24%   +0.13%     
==========================================
  Files          23       23              
  Lines        2178     2173       -5     
==========================================
- Hits         1723     1722       -1     
+ Misses        455      451       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jeertmans jeertmans changed the title fix(present) not reversing to previous scene fix(present): not reversing to previous scene Aug 26, 2026
Comment thread CHANGELOG.md

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @wuerfelfreak: it looks like you messed up with another PR you are authoring, this entry is not related to this PR :-)

@wuerfelfreak wuerfelfreak Sep 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit confused. This is PR #671 and the change in CHANGELOG.md also references #671. And the change also matches the title of this PR.

The line I added in commit fa2a67b was the following, right?

- Fixed presenter not reversing to previous scene.
  [@wuerfelfreak](https://github.com/wuerfelfreak) [#671](https://github.com/jeertmans/manim-slides/pull/671)

(By merging with main (in commit ce4262f) I also incorporated the changelog entry of #673 but that is not one of my PRs)

I can't see where I messed up. Am I missing something?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's super weird: I would swear that GitHub would have printed a different changelog entry. Maybe it was a bug from their side, but it is now fixed apparently.

@jeertmans jeertmans added present Related to the main "present" feature and removed waiting triage This issue or PR needs to be labeled accordingly. waiting review Waiting review (or response) by a maintainer labels Sep 3, 2026
@jeertmans

Copy link
Copy Markdown
Owner

Thanks!

@jeertmans
jeertmans merged commit b2757ad into jeertmans:main Sep 3, 2026
52 of 54 checks passed
ajlaanayan-crypto added a commit to ajlaanayan-crypto/manim-slides that referenced this pull request Sep 29, 2026
* Fixed presenter not reversing to previous scene

* Fixed presenter not reversing to previous scene - Changelog

---------

Co-authored-by: wuerfelfreak <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

present Related to the main "present" feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants