Fix triggering of stop animation when playing no samples after stopping song playing samples

This commit is contained in:
Andres
2019-11-19 19:07:10 -03:00
parent 229de18bc0
commit df3e388393
2 changed files with 8 additions and 1 deletions

View File

@@ -167,6 +167,11 @@ public:
return m_wasPlaying;
}
void setWasPlaying(bool wasPlaying)
{
m_wasPlaying = wasPlaying;
}
signals:
void playing();
void notPlaying();

View File

@@ -984,9 +984,11 @@ void SampleTrackView::dropEvent(QDropEvent *de)
void SampleTrackView::stopPlaying()
{
if (dynamic_cast<SampleTrack*>(getTrack())->wasPlaying())
SampleTrack * smpltrck = dynamic_cast<SampleTrack*>(getTrack());
if (smpltrck->wasPlaying())
{
m_activityIndicator->notPlaying();
smpltrck->setWasPlaying(false);
}
}