diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2017-12-04 14:55:13 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2017-12-04 14:55:13 +0100 |
commit | 0224fc5210b61ec323f05957e626edad9d123001 (patch) | |
tree | 53d646e1462b29dc247c9165363c5af72831da40 | |
parent | b96277e28a583b4dfe84823d49e8133de78daed8 (diff) | |
download | vdr-0224fc5210b61ec323f05957e626edad9d123001.tar.gz vdr-0224fc5210b61ec323f05957e626edad9d123001.tar.bz2 |
Fixed positioning to the current item when changing the sort mode in the Recordings menu, in case there is a LastReplayed recording
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | menu.c | 12 |
2 files changed, 9 insertions, 5 deletions
@@ -9215,3 +9215,5 @@ Video Disk Recorder Revision History - Added a note to PLUGINS.html about writing log messages in English. - Fixed a deadlock when moving a folder containing several recordings between different volumes (reported by Matthias Senzel). +- Fixed positioning to the current item when changing the sort mode in the Recordings + menu, in case there is a LastReplayed recording. @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 4.46 2017/11/27 15:19:07 kls Exp $ + * $Id: menu.c 4.47 2017/12/04 14:50:59 kls Exp $ */ #include "menu.h" @@ -2858,10 +2858,10 @@ public: cMenuRecordingItem(const cRecording *Recording, int Level); ~cMenuRecordingItem(); void IncrementCounter(bool New); - const char *Name(void) { return name; } - int Level(void) { return level; } - const cRecording *Recording(void) { return recording; } - bool IsDirectory(void) { return name != NULL; } + const char *Name(void) const { return name; } + int Level(void) const { return level; } + const cRecording *Recording(void) const { return recording; } + bool IsDirectory(void) const { return name != NULL; } void SetRecording(const cRecording *Recording) { recording = Recording; } virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable); }; @@ -3167,6 +3167,8 @@ eOSState cMenuRecordings::Sort(void) { if (HasSubMenu()) return osContinue; + if (const cMenuRecordingItem *ri = (cMenuRecordingItem *)Get(Current())) + SetRecording(ri->Recording()->FileName()); // makes sure the Recordings menu will reposition to the current recording IncRecordingsSortMode(DirectoryName()); recordingsStateKey.Reset(); Set(true); |