Fixed triggering of stop animation when not playing

This commit is contained in:
Andres
2019-11-17 23:05:16 -03:00
parent e056ecb27b
commit 229de18bc0
2 changed files with 17 additions and 1 deletions

View File

@@ -162,6 +162,11 @@ public:
return "sampletrack";
}
bool wasPlaying()
{
return m_wasPlaying;
}
signals:
void playing();
void notPlaying();
@@ -215,6 +220,7 @@ public:
public slots:
void showEffects();
void stopPlaying();
protected:

View File

@@ -866,7 +866,7 @@ SampleTrackView::SampleTrackView( SampleTrack * _t, TrackContainerView* tcv ) :
connect(_t, SIGNAL(notPlaying()),
m_activityIndicator, SLOT(notPlaying()));
connect(Engine::getSong(), SIGNAL(stopped()),
m_activityIndicator, SLOT(notPlaying()));
this, SLOT(stopPlaying()));
setModel( _t );
@@ -982,6 +982,16 @@ void SampleTrackView::dropEvent(QDropEvent *de)
void SampleTrackView::stopPlaying()
{
if (dynamic_cast<SampleTrack*>(getTrack())->wasPlaying())
{
m_activityIndicator->notPlaying();
}
}
SampleTrackWindow::SampleTrackWindow(SampleTrackView * tv) :
QWidget(),