Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IO editor always starting in "hide all, guess one" mode #3709

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

iamllama
Copy link
Contributor

@iamllama iamllama commented Jan 9, 2025

Closes #3703

There's only 3 places where hideAllGuessOne is set:

  • on init (set to true)
  • in NoteEditor's setupMaskEditor when in IO edit mode (searches for "oi=1" in occlusions)
  • and by the toolbar buttons (but that's irrelevant)

The second is called by the desktop editor, but not by ankidroid (nor ankimobile, i assume), so it always starts out in "hide all, guess one" mode regardless of the note

The fix proposed here is to move the write from NoteEditor's setupMaskEditor to MaskEditor's setupMaskEditorForEdit, which is called on all platforms

@dae
Copy link
Member

dae commented Jan 9, 2025

LGTM - thank you!

@dae dae merged commit b6d7bb1 into ankitects:main Jan 9, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug Report: Editing Image Occlusion will always reset mode to “hide all, guess one”
2 participants