From f23a6a2f627e739fa342b2a9d450ebcca2d999d8 Mon Sep 17 00:00:00 2001 From: fgerlits Date: Tue, 19 Jul 2005 18:21:01 +0000 Subject: [PATCH] modified addToScratchpad to update to the new version of the playlist (for example, in case its title got changed) --- livesupport/products/gLiveSupport/src/GLiveSupport.cxx | 4 ++-- livesupport/products/gLiveSupport/src/GLiveSupport.h | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/livesupport/products/gLiveSupport/src/GLiveSupport.cxx b/livesupport/products/gLiveSupport/src/GLiveSupport.cxx index 7e0caea52..df729cb2c 100644 --- a/livesupport/products/gLiveSupport/src/GLiveSupport.cxx +++ b/livesupport/products/gLiveSupport/src/GLiveSupport.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.57 $ + Version : $Revision: 1.58 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.cxx,v $ ------------------------------------------------------------------------------*/ @@ -589,7 +589,7 @@ GLiveSupport :: addToScratchpad(Ptr::Ref playable) Ptr::Ref listElement = *it; if (*listElement->getId() == *playable->getId()) { // found scratchpadContents->erase(it); - scratchpadContents->push_front(listElement); + scratchpadContents->push_front(playable); masterPanel->updateScratchpadWindow(); return; } diff --git a/livesupport/products/gLiveSupport/src/GLiveSupport.h b/livesupport/products/gLiveSupport/src/GLiveSupport.h index 227e9d029..a2d0542be 100644 --- a/livesupport/products/gLiveSupport/src/GLiveSupport.h +++ b/livesupport/products/gLiveSupport/src/GLiveSupport.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.42 $ + Version : $Revision: 1.43 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.h,v $ ------------------------------------------------------------------------------*/ @@ -102,7 +102,7 @@ class MasterPanelWindow; * respective documentation. * * @author $Author: fgerlits $ - * @version $Revision: 1.42 $ + * @version $Revision: 1.43 $ * @see LocalizedObject#getBundle(const xmlpp::Element &) * @see AuthenticationClientFactory * @see StorageClientFactory @@ -471,13 +471,14 @@ class GLiveSupport : public LocalizedConfigurable, throw (XmlRpcException); /** - * Add a file to the Scratchpad, and update it. + * Add an item to the Scratchpad, and update it. + * If the item is already in the scratchpad, it gets pushed to the top. * * @param playable the audio clip or playlist to be added */ void addToScratchpad(Ptr::Ref playable) throw (); - + /** * Return the Scratchpad contents. *