Skip to content
Permalink
Browse files

Deselect before deleting the current keyframe

This solves some issues with selections and transformations after
deleting a keyframe. Also added a check for empty boundaries
during copy becuase the program crashed, I'm guess when mBounds
was null.
  • Loading branch information...
scribblemaniac committed Apr 11, 2019
1 parent fddf846 commit b43b024c966df770f864dd8db93bebc03dc0f9f7
Showing with 3 additions and 0 deletions.
  1. +2 −0 core_lib/src/graphics/bitmap/bitmapimage.cpp
  2. +1 −0 core_lib/src/interface/editor.cpp
@@ -136,6 +136,8 @@ BitmapImage BitmapImage::copy()

BitmapImage BitmapImage::copy(QRect rectangle)
{
if (rectangle.isEmpty() || mBounds.isEmpty()) return BitmapImage();

QRect intersection2 = rectangle.translated(-mBounds.topLeft());
BitmapImage result = BitmapImage(rectangle.topLeft(), image()->copy(intersection2));
return result;
@@ -941,6 +941,7 @@ void Editor::removeKey()

backup(tr("Remove frame"));

mScribbleArea->deselectAll();
layer->removeKeyFrame(currentFrame());

scrubBackward();

0 comments on commit b43b024

Please sign in to comment.
You can’t perform that action at this time.