Skip to content
Browse files

Attempt to apply any active transformations before playing

If transformations are unapplied, it will apply the transformation
to each frame during playback, which is not desirable.
  • Loading branch information...
scribblemaniac committed Apr 11, 2019
1 parent b43b024 commit 9942932844d9dadc390777fd15c0b5a2dfc7d3af
Showing with 7 additions and 1 deletion.
  1. +6 −0 core_lib/src/managers/playbackmanager.cpp
  2. +1 −1 core_lib/src/tool/movetool.cpp
@@ -26,6 +26,7 @@ GNU General Public License for more details.
#include "layersound.h"
#include "layermanager.h"
#include "soundclip.h"
#include "toolmanager.h"

PlaybackManager::PlaybackManager(Editor* editor) : BaseManager(editor)
@@ -91,6 +92,11 @@ void PlaybackManager::play()

// This is probably not the right place or function to be calling this, but it's the easiest thing to do right now that works
// TODO make a new tool function to handle playing (or perhaps generic scrubbing)
bool switchLayer = editor()->tools()->currentTool()->switchingLayer();
if (!switchLayer) return;

int frame = editor()->currentFrame();
if (frame >= mEndFrame || frame < mStartFrame)
@@ -362,7 +362,7 @@ int MoveTool::showTransformWarning()
int returnValue = QMessageBox::warning(nullptr,
tr("Layer switch", "Windows title of layer switch pop-up."),
tr("You are about to switch layer, do you want to apply the transformation?"),
tr("You are about to switch away, do you want to apply the transformation?"),
QMessageBox::No | QMessageBox::Cancel | QMessageBox::Yes,
return returnValue;

0 comments on commit 9942932

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