[mythtv] [PATCH] - [BUG] mythfrontend - Delete Recording
dan
dan at milkcarton.com
Sat Apr 5 18:33:35 EST 2003
When in the delete recording screen, I had one recording listed. I
pressed space to bring up the popup widget and deleted it. Now the box
says "Sorry, No Recordings Available". That part works fantastic.
However, if I press space again, the popup will display the info of the
last item deleted. I've created a patch to address this issue.
Info on patch:
In PlaybackBox::selected() change remove(curitem) to use the
deleteSelected method so logic only has to be done in one place. in
deleteSelected check that showData.count() has count != 0 before calling
the remove method.
-dan
-------------- next part --------------
Index: programs/mythfrontend/playbackbox.cpp
===================================================================
RCS file: /var/lib/cvs/MC/programs/mythfrontend/playbackbox.cpp,v
retrieving revision 1.106
diff -u -d -r1.106 playbackbox.cpp
--- programs/mythfrontend/playbackbox.cpp 5 Apr 2003 21:23:11 -0000 1.106
+++ programs/mythfrontend/playbackbox.cpp 6 Apr 2003 03:26:05 -0000
@@ -1145,7 +1145,7 @@
if (showData.count() == 0)
{
- tmp.drawText(showTitleLeft, (int)((double)bgShowPixmap->height() / (double)2) - showingHeight,
+ tmp.drawText(showTitleLeft, (int)((double)bgShowPixmap->height() / (double)2) - showingHeight,
showTitleWidth + showDateWidth + showTimeWidth, showingHeight, AlignCenter,
"Sorry, No Recordings Available");
}
@@ -1561,7 +1561,8 @@
if (!curitem || ignoreevents)
return;
- remove(curitem);
+ if (showData.count() != 0)
+ remove(curitem);
}
@@ -1572,10 +1573,14 @@
if (!curitem || ignoreevents)
return;
- switch (type)
+ switch (type)
{
- case Play: play(curitem); break;
- case Delete: remove(curitem); break;
+ case Play:
+ play(curitem);
+ break;
+ case Delete:
+ deleteSelected();
+ break;
}
}
More information about the mythtv-dev
mailing list