gui: Don't update gui if zero tracks were cleared

I'm seeing Ocarina crash when a tempq finishes and gets removed.  For
now, let's only have the gui handle queue clearing if tracks were
actually removed.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2016-03-22 16:04:25 -04:00
parent 76985c8842
commit 08bf842767
1 changed files with 5 additions and 3 deletions

View File

@ -115,9 +115,11 @@ void Tab :: on_track_removed(unsigned int row)
void Tab :: on_tracks_cleared(unsigned int n)
{
tab_window->q_model->on_cleared(n);
tab_label->set_size();
tab_runtime_changed();
if (n > 0) {
tab_window->q_model->on_cleared(n);
tab_label->set_size();
tab_runtime_changed();
}
}
void Tab :: on_track_updated(unsigned int row)