[mythtv] [patch] mythvideo: fix bug where select on directory causes wrong video to play.

Lucas Meijer lucas at mach8.nl
Tue May 24 11:43:44 UTC 2005


When using mythvideo in "Listings" mode, videotree::curitem keeps 
getting set to whatever the user scrolls by. when the user does a 
select, curitem gets played.

This causes a bug when you do a select on a directory. the video that 
you last looked at will be played.

This patch clears curitem when scrolling onto a directory so this won't 
happen. More pretty would be if the select could be translated into a 
"right" command, which is what the user probably intended.

Bye, Lucas
-------------- next part --------------
? patch
Index: mythvideo/mythvideo/videotree.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythplugins/mythvideo/mythvideo/videotree.cpp,v
retrieving revision 1.41
diff -u -r1.41 videotree.cpp
--- mythvideo/mythvideo/videotree.cpp	9 Apr 2005 00:50:46 -0000	1.41
+++ mythvideo/mythvideo/videotree.cpp	24 May 2005 11:36:43 -0000
@@ -659,7 +659,13 @@
         //  not a leaf node 
         //  (no video file here, just a directory)
         //
-        
+
+        if (curitem)
+        {
+            delete curitem;
+            curitem = 0;
+        }        
+
         video_title->SetText("");
         video_file->SetText("");
         video_player->SetText(""); 


More information about the mythtv-dev mailing list