-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
Load saved file #311
Load saved file #311
Conversation
@giacomoalbe @albfan hey guys, I pretty much have this patch ready, except for an issue that I can't figure out why it's happening. If a shape is inside an artboard, after it gets loaded, is not possible to move it. The selection bound moves, the resize works, and moving with the arrow keys work, but not with the mouse. To test it, create an arboard and a shape inside, save the file, close Akira and load that file. |
Another issue solved, but another issue found. |
I fixed it by saving the RGBA colors in a string format and creating a dedicated method to load them again. |
Here's a file example you can use to test this patch. And this is how the app should look once loaded, including remembering the currently selected item. |
I checked out this PR locally and did some tests, but I haven't been able to make the Artboard children to work. I don't know whether it is a known bug or not, but everything seems to be working except for the Artboard children stuff. I have those critical errors for the Artboard's children layers:
And here's a screenshot of the Layers panel after the file import: As you can see, all the Artboard are expanded, so the children should be visible, but they're not. Idk if this is due to the fact that the Layers panel and ItemsManager are not updated to the Master branch, but as of now they're not working as expected. |
@giacomoalbe yes, this is normal as the issue is due to the incompatibility with the master branch. |
…ems inside an artboard
@albfan @giacomoalbe this is ready for a full review. I stumbled upon some quirks which I'm not totally sure why. |
case "AkiraLibModelsCanvasArtboard": | ||
insert_type = Models.CanvasItemType.ARTBOARD; | ||
item = insert_item (pos_x, pos_y); | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I can see the CanvasImage
item's loading is not yet implemented.
I don't know if this is due to the fact the we have a separated PR for images and that would have caused merge issue, so I state this here as a reminder!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I left the image stuff outside as I'm not yet saving images at all.
I will implement this in a separate PR.
Ok, for me this code is super ok! I just need to take a more detailed look at it (and maybe start tinkering with it) in order to properly understand each stage involved in the process, but overall I think it's very well written and concise! |
Summary / How this PR fixes the problem?
Implement the load of a previously saved file.
This PR fixes/implements the following bugs/features:
Fixes