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 more cache issues. #1581

Merged
merged 7 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/src/actioncommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ Status ActionCommands::importMovieVideo()
}

mEditor->layers()->notifyAnimationLengthChanged();
emit mEditor->framesModified();

progressDialog.setValue(100);
progressDialog.close();
Expand Down Expand Up @@ -659,7 +660,7 @@ void ActionCommands::moveFrameForward()
}

mEditor->layers()->notifyAnimationLengthChanged();
mEditor->framesModified();
emit mEditor->framesModified();
}

void ActionCommands::moveFrameBackward()
Expand All @@ -672,7 +673,7 @@ void ActionCommands::moveFrameBackward()
mEditor->scrubBackward();
}
}
mEditor->framesModified();
emit mEditor->framesModified();
}

Status ActionCommands::addNewBitmapLayer()
Expand Down
14 changes: 10 additions & 4 deletions core_lib/src/interface/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ void Editor::restoreKey()
layer = object()->getLayer(layerIndex);
addKeyFrame(layerIndex, frame);
dynamic_cast<LayerBitmap*>(layer)->getBitmapImageAtFrame(frame)->paste(&lastBackupBitmapElement->bitmapImage);
emit frameModified(frame);
}
if (lastBackupElement->type() == BackupElement::VECTOR_MODIF)
{
Expand All @@ -373,6 +374,7 @@ void Editor::restoreKey()
layer = object()->getLayer(layerIndex);
addKeyFrame(layerIndex, frame);
dynamic_cast<LayerVector*>(layer)->getVectorImageAtFrame(frame)->paste(lastBackupVectorElement->vectorImage);
emit frameModified(frame);
}
if (lastBackupElement->type() == BackupElement::SOUND_MODIF)
{
Expand Down Expand Up @@ -766,19 +768,22 @@ bool Editor::importBitmapImage(const QString& filePath, int space)

while (reader.read(&img))
{
if (!layer->keyExists(currentFrame()))
int frameNumber = mFrame;
if (!layer->keyExists(frameNumber))
{
addNewKey();
}
BitmapImage* bitmapImage = layer->getBitmapImageAtFrame(currentFrame());
BitmapImage* bitmapImage = layer->getBitmapImageAtFrame(frameNumber);
BitmapImage importedBitmapImage(pos, img);
bitmapImage->paste(&importedBitmapImage);
emit frameModified(bitmapImage->pos());

if (space > 1) {
scrubTo(currentFrame() + space);
frameNumber += space;
} else {
scrubTo(currentFrame() + 1);
frameNumber += 1;
}
scrubTo(frameNumber);

backup(tr("Import Image"));

Expand Down Expand Up @@ -811,6 +816,7 @@ bool Editor::importVectorImage(const QString& filePath)
{
importedVectorImage.selectAll();
vectorImage->paste(importedVectorImage);
emit frameModified(importedVectorImage.pos());

backup(tr("Import Image"));
}
Expand Down
3 changes: 3 additions & 0 deletions core_lib/src/managers/viewmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,9 @@ void ViewManager::onCurrentFrameChanged()
{
updateViewTransforms();
}

// emit changes either way because of potential camera interpolation changes
emit viewChanged();
}

void ViewManager::resetView()
Expand Down