summaryrefslogtreecommitdiff
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
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
-rw-r--r--HISTORY2
-rw-r--r--menu.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/HISTORY b/HISTORY
index 3b7d8c04..58dc5469 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9264,3 +9264,5 @@ Video Disk Recorder Revision History
- Added a note about the fixed UDP port for SVDRP discovery to vdr.1.
- Fixed updating the Timers menu after turning a local timer on/off with the Red
button.
+- Fixed keeping the cursor position in the Recordings menu in case a timer starts
+ recording while the menu is open.
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);