This commit is contained in:
fgerlits 2007-10-25 16:45:31 +00:00
parent 43d8dd6ea3
commit 6f6f868e80
1 changed files with 11 additions and 2 deletions

View File

@ -397,15 +397,24 @@ LiveModeWindow :: selectionIsSingle(void) throw ()
void
LiveModeWindow :: onOutputPlay(void) throw ()
{
Gtk::TreeIter itemPlayed;
Ptr<Playable>::Ref playable = getFirstSelectedPlayable();
if (playable) {
itemPlayed = treeModel->get_iter(*selectedIter);
} else {
itemPlayed = treeModel->children().begin();
if (itemPlayed) {
playable = (*itemPlayed)[modelColumns.playableColumn];
}
}
if (playable) {
try {
gLiveSupport->playOutputAudio(playable);
gLiveSupport->setNowPlaying(playable);
Gtk::TreeIter iter = treeModel->get_iter(*selectedIter);
treeView->removeItem(iter);
treeView->removeItem(itemPlayed);
gLiveSupport->runMainLoop();