Permalink
Browse files

Merge pull request #853 from CandyFace/turn-off-individual-sound

enhancement: don't play sound when layer is hidden.
  • Loading branch information...
chchwy committed Jan 12, 2018
2 parents 7c4cd13 + 78c9abd commit 93bffc52548cfc551fa82f5e5276da14c0587d6c
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 93bffc5

Please sign in to comment.