This commit is contained in:
fgerlits 2007-10-25 16:45:31 +00:00
parent 43d8dd6ea3
commit 6f6f868e80

View file

@ -397,15 +397,24 @@ LiveModeWindow :: selectionIsSingle(void) throw ()
void void
LiveModeWindow :: onOutputPlay(void) throw () LiveModeWindow :: onOutputPlay(void) throw ()
{ {
Gtk::TreeIter itemPlayed;
Ptr<Playable>::Ref playable = getFirstSelectedPlayable(); 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) { if (playable) {
try { try {
gLiveSupport->playOutputAudio(playable); gLiveSupport->playOutputAudio(playable);
gLiveSupport->setNowPlaying(playable); gLiveSupport->setNowPlaying(playable);
Gtk::TreeIter iter = treeModel->get_iter(*selectedIter); treeView->removeItem(itemPlayed);
treeView->removeItem(iter);
gLiveSupport->runMainLoop(); gLiveSupport->runMainLoop();