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 crash when importing image to empty frame on hidden layer #1820

Merged
merged 5 commits into from
Apr 14, 2024

Conversation

J5lx
Copy link
Member

@J5lx J5lx commented Apr 13, 2024

This fixes the crash reported at https://discuss.pencil2d.org/t/pencil2d-crashes-when-i-import-an-image-to-a-hidden-layer/8016?u=j5lx.

  • Also fixed a potential memory leak in Layer::addNewKeyFrameAt
  • Also disabled timeline hover effect for hidden layers since double-click-to-add-keyframe is disabled for those
  • Also implicitly fixed an issue where trying to import to hidden layers showed a warning for empty frames but not on keyframes

@J5lx J5lx added Bug Timeline UI Related to the visual appearance of the program Crash File Import labels Apr 13, 2024
@J5lx J5lx added this to the v0.6.7 milestone Apr 13, 2024
* @return The newly created keyframe or `nullptr` if the layer is not visible
* @see Editor::addNewKey()
*/
KeyFrame* addKeyFrame(int layerNumber, int frameIndex);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

second parameter renamed so declaration matches definition

Copy link
Member

@MrStevns MrStevns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crash confirmed fixed.

Additional changes looks good to me too 👍

@MrStevns MrStevns merged commit 37cbd97 into pencil2d:master Apr 14, 2024
8 checks passed
@J5lx J5lx deleted the fixes/hidden-layer-import branch July 2, 2024 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Crash File Import Timeline UI Related to the visual appearance of the program
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants