From 6f6f868e80e7fbcb9bad32c9822d8c9ada99648b Mon Sep 17 00:00:00 2001 From: fgerlits Date: Thu, 25 Oct 2007 16:45:31 +0000 Subject: [PATCH] fixed #2273 --- .../products/gLiveSupport/src/LiveModeWindow.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/campcaster/src/products/gLiveSupport/src/LiveModeWindow.cxx b/campcaster/src/products/gLiveSupport/src/LiveModeWindow.cxx index a778ffb71..cb42346bd 100644 --- a/campcaster/src/products/gLiveSupport/src/LiveModeWindow.cxx +++ b/campcaster/src/products/gLiveSupport/src/LiveModeWindow.cxx @@ -397,15 +397,24 @@ LiveModeWindow :: selectionIsSingle(void) throw () void LiveModeWindow :: onOutputPlay(void) throw () { + Gtk::TreeIter itemPlayed; Ptr::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();