-
Notifications
You must be signed in to change notification settings - Fork 100
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
Shapes not added to Decoded Drawing #27
Comments
Update: So it looks like when you draw on a decoded drawing, the append(shape:) method gets called in Drawing, but the new shape doesn't appear in the drawing's shapes array. I haven't been able to figure out why, so instead i just made a hacky fix. If anyone's having the same problem, here's what I did to temporarily solve it: Overlay 2 drawsana views, decode your saved drawing into the background drawsana view, and let the user interact with the foreground one. Then, when you want to save your edits, merge the shapes of the 2 drawsana view drawings into a new Drawing, and encode. |
Thanks for taking the time to report and investigate this issue. Serialization isn't well-tested and I'm sorry you ran into a bug. As you can probably tell, time to work on this project is short and I hope to be able to give it a deeper look soon. |
I have another possibility for the root cause of this bug. Could it be that you're hanging onto the old |
There was a bug in the library where the |
Drawing (only tested pen strokes) on a decoded drawing does not add shapes to the shapes array of that drawing. The new shapes still appear on the drawing, but since they're not added to the array they're not encoded if you want to save the drawing.
Edit: Never mind, they are being added to the drawing. But somehow, new shapes on a decoded drawing aren't being properly encoded.
The text was updated successfully, but these errors were encountered: