From 990bc6a11f675cb54c7f1f6495f931a1f6b61f8c Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Mon, 27 Nov 2017 15:19:43 +0100 Subject: [PATCH] Fixed positioning the cursor in the Recordings menu when moving a recording between different volumes --- HISTORY | 2 ++ menu.c | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/HISTORY b/HISTORY index b266a627..3e2bee92 100644 --- a/HISTORY +++ b/HISTORY @@ -9210,3 +9210,5 @@ Video Disk Recorder Revision History destroyed. - Fixed a possible crash when moving a recording between different volumes (reported by Matthias Senzel). +- Fixed positioning the cursor in the Recordings menu when moving a recording between + different volumes. diff --git a/menu.c b/menu.c index f5545edc..20e7189d 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.45 2017/11/26 15:07:00 kls Exp $ + * $Id: menu.c 4.46 2017/11/27 15:19:07 kls Exp $ */ #include "menu.h" @@ -2960,8 +2960,10 @@ void cMenuRecordings::Set(bool Refresh) const char *CurrentRecording = *fileName ? *fileName : cReplayControl::LastReplayed(); cRecordings *Recordings = cRecordings::GetRecordingsWrite(recordingsStateKey); // write access is necessary for sorting! cMenuRecordingItem *LastItem = NULL; - if (cMenuRecordingItem *ri = (cMenuRecordingItem *)Get(Current())) - CurrentRecording = ri->Recording()->FileName(); + if (!CurrentRecording) { + if (cMenuRecordingItem *ri = (cMenuRecordingItem *)Get(Current())) + CurrentRecording = ri->Recording()->FileName(); + } int current = Current(); Clear(); GetRecordingsSortMode(DirectoryName());