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

Replace costume when type changed during edit #2500

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

coproc
Copy link

@coproc coproc commented Sep 27, 2019

As discussed with bromagosa at SnapCon I propose these changes to fix issue #2492 ("Editing costume type (SVG <-> bitmap) not working properly").

The following will improve:

  • new costumes will always have a unique name of the form 'Untitled' or 'Untitled(1)' ... (currently new SVG costumes will have default names of the form 'costume1', 'costume2', etc. not even guaranteeing a unique name)
  • when editing a costume and changing its type while editing, the original costume will be changed as expected in all cases (currently when editing a SVG costume and changing its type to bitmap, the original costume will remain unchanged, although the sprite will wear the changed costume; and when editing a bitmap costume and changing its type to SVG the edited costume will be added as new costume)
  • the code of VectorPaintEditorMorph does not depend on the Costume class any more
  • the Costume class does not depend on PaintEditorMorph or VectorPaintEditorMorph any more

@bromagosa
Copy link
Collaborator

Just to recap, this fixes #2492, among other issues :)

(thanks @coproc!)

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.

2 participants