Permalink
Browse files

skip sound if layer is hidden

  • Loading branch information...
CandyFace committed Jan 12, 2018
1 parent 4799cc5 commit 78c9abd78543df63931a3ee03227dc0c04f194e6
Showing with 6 additions and 0 deletions.
  1. +5 −0 core_lib/managers/playbackmanager.cpp
  2. +1 −0 core_lib/structure/layer.h
@@ -180,6 +180,11 @@ void PlaybackManager::playSounds(int frame)
{
KeyFrame* key = layer->getLastKeyFrameAtPosition(frame);
if (!layer->getVisibility())
{
continue;
}
if (key != nullptr)
{
// add keyframe position to list
@@ -89,6 +89,7 @@ class Layer : public QObject
KeyFrame* getLastKeyFrameAtPosition(int position) const;
bool keyExistsWhichCovers(int frameNumber);
KeyFrame *getKeyFrameWhichCovers(int frameNumber);
bool getVisibility() { return mVisible; }
void foreachKeyFrame(std::function<void(KeyFrame*)>);

0 comments on commit 78c9abd

Please sign in to comment.