Fixed isTyping() so it's no longer constantly returns true (was breaking all keyboard shortcuts)
When deleting the last annotation, a new annotation is automatically created. We automatically set the toolbox of this new annotation to be the same as the one that was deleted so it doesn't auto-change to paintbrush by default, but we needed to set spline.isBezier to false when the deleted spline was Bezier, otherwise spline store continues to say it is Bezier and the desync between annotation state and spline store breaks the toolbar logic (remember we can't access spline store in ui because it's a class component).
Was rendering all Bezier splines as open or closed depending on the state of the active annotation, now they're rendered correctly.
Checklist:
Put an x in the boxes that apply to this pull request (you can also fill these out after opening the pull request). If you're unsure about any of these, don't hesitate to leave a comment on this pull request!
[ ] I have read the gliff.ai Contribution Guide.
[ ] I have requested to pull a branch and not from main.
[ ] I have checked all commit message styles match the requested structure.
[ ] My code follows the style guidelines of this project.
[ ] I have commented my code, particularly in hard-to-understand areas.
[ ] I have performed a self-review of my own code.
[ ] I have assigned 3 or less reviewers.
[ ] New and existing unit tests pass locally with my changes.
[ ] I have added tests that prove my fix is effective or that my feature works.
[ ] My changes generate no new warnings.
[ ] I have made corresponding changes to the documentation.
[ ] New database changes have been committed.
[ ] If appropriate, I have bumped any version numbers.
Description
Three bug fixes:
isTyping()
so it's no longer constantly returns true (was breaking all keyboard shortcuts)spline.isBezier
tofalse
when the deleted spline was Bezier, otherwise spline store continues to say it is Bezier and the desync between annotation state and spline store breaks the toolbar logic (remember we can't access spline store in ui because it's a class component).Checklist:
Put an
x
in the boxes that apply to this pull request (you can also fill these out after opening the pull request). If you're unsure about any of these, don't hesitate to leave a comment on this pull request!