summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2018-02-10 12:34:10 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2018-02-10 12:34:10 +0100
commit902c83ece381154ae3d50150e99519b987ec941d (patch)
treed34b45e8cb919e22de286a96d1be9facbc8cb724 /menu.c
parent30650b9c13869fed015d0e657b8ce23fa5ee09ca (diff)
downloadvdr-902c83ece381154ae3d50150e99519b987ec941d.tar.gz
vdr-902c83ece381154ae3d50150e99519b987ec941d.tar.bz2
Fixed keeping the cursor position in the Recordings menu in case a timer starts recording while the menu is open
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/menu.c b/menu.c
index ce057839..fc49d0a6 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 4.58 2018/02/10 10:51:49 kls Exp $
+ * $Id: menu.c 4.59 2018/02/10 12:32:52 kls Exp $
*/
#include "menu.h"
@@ -2989,17 +2989,17 @@ void cMenuRecordings::Set(bool Refresh)
{
if (cRecordings::GetRecordingsRead(recordingsStateKey)) {
recordingsStateKey.Remove();
- const char *CurrentRecording = *fileName ? *fileName : cReplayControl::LastReplayed();
cRecordings *Recordings = cRecordings::GetRecordingsWrite(recordingsStateKey); // write access is necessary for sorting!
- cMenuRecordingItem *LastItem = NULL;
- if (!CurrentRecording) {
- if (cMenuRecordingItem *ri = (cMenuRecordingItem *)Get(Current()))
- CurrentRecording = ri->Recording()->FileName();
- }
+ const char *CurrentRecording = NULL;
+ if (cMenuRecordingItem *ri = (cMenuRecordingItem *)Get(Current()))
+ CurrentRecording = ri->Recording()->FileName();
+ if (!CurrentRecording)
+ CurrentRecording = *fileName ? *fileName : cReplayControl::LastReplayed();
int current = Current();
Clear();
GetRecordingsSortMode(DirectoryName());
Recordings->Sort();
+ cMenuRecordingItem *LastItem = NULL;
for (const cRecording *Recording = Recordings->First(); Recording; Recording = Recordings->Next(Recording)) {
if ((!filter || filter->Filter(Recording)) && (!base || (strstr(Recording->Name(), base) == Recording->Name() && Recording->Name()[strlen(base)] == FOLDERDELIMCHAR))) {
cMenuRecordingItem *Item = new cMenuRecordingItem(Recording, level);