summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2018-02-10 12:51:19 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2018-02-10 12:51:19 +0100
commit6b9c5aa1ac0211cf7c579481cc69a4d019c00122 (patch)
tree26c41341b0effcd0ef26161b211883adffd16fc5
parent902c83ece381154ae3d50150e99519b987ec941d (diff)
downloadvdr-6b9c5aa1ac0211cf7c579481cc69a4d019c00122.tar.gz
vdr-6b9c5aa1ac0211cf7c579481cc69a4d019c00122.tar.bz2
When a timer is newly created in the Timers menu, it now immediately appears at the correct position in the list
-rw-r--r--HISTORY3
-rw-r--r--menu.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/HISTORY b/HISTORY
index 58dc5469..2f772ce9 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9266,3 +9266,6 @@ Video Disk Recorder Revision History
button.
- Fixed keeping the cursor position in the Recordings menu in case a timer starts
recording while the menu is open.
+- When a timer is newly created in the Timers menu, it now immediately appears at the
+ correct position in the list, rather than first being added at the end and then
+ jumping to the proper offset.
diff --git a/menu.c b/menu.c
index fc49d0a6..c767f357 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.59 2018/02/10 12:32:52 kls Exp $
+ * $Id: menu.c 4.60 2018/02/10 12:45:36 kls Exp $
*/
#include "menu.h"
@@ -1399,7 +1399,11 @@ eOSState cMenuTimers::ProcessKey(eKeys Key)
if (const cTimer *Timer = cMenuEditTimer::AddedTimer()) {
// a newly created timer was confirmed with Ok and the proper item needs to be added:
LOCK_TIMERS_READ;
- Add(new cMenuTimerItem(Timer), true);
+ cMenuTimerItem *CurrentItem = new cMenuTimerItem(Timer);
+ Add(CurrentItem, true);
+ Sort();
+ SetCurrent(CurrentItem);
+ SetHelpKeys();
Display();
}
if (Key != kNone)