Fixed triggering of stop animation when not playing
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user