summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-02-11 11:27:34 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2013-02-11 11:27:34 +0100
commitd2ef44f8f59e41e59777ba0cf12f8f343aaf1428 (patch)
treedfd52ccaafa8668345f7dda944ff428b04548b64 /menu.c
parentd8ba7158bc4dbc93e487acc8d35304f0f07e83a4 (diff)
downloadvdr-d2ef44f8f59e41e59777ba0cf12f8f343aaf1428.tar.gz
vdr-d2ef44f8f59e41e59777ba0cf12f8f343aaf1428.tar.bz2
Fixed moving editing marks, so that they don't get overwritten with old values through an update of the marks file
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/menu.c b/menu.c
index ae389847..9288198d 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 2.76 2013/02/02 14:00:39 kls Exp $
+ * $Id: menu.c 2.77 2013/02/11 11:08:54 kls Exp $
*/
#include "menu.h"
@@ -4763,9 +4763,8 @@ void cReplayControl::MarkToggle(void)
{
int Current, Total;
if (GetIndex(Current, Total, true)) {
- cMark *m = marks.Get(Current);
lastCurrent = -1; // triggers redisplay
- if (m)
+ if (cMark *m = marks.Get(Current))
marks.Del(m);
else {
marks.Add(Current);
@@ -4784,8 +4783,7 @@ void cReplayControl::MarkJump(bool Forward)
int Current, Total;
if (GetIndex(Current, Total)) {
if (marks.Count()) {
- cMark *m = Forward ? marks.GetNext(Current) : marks.GetPrev(Current);
- if (m) {
+ if (cMark *m = Forward ? marks.GetNext(Current) : marks.GetPrev(Current)) {
Goto(m->Position(), true);
displayFrames = true;
return;
@@ -4801,8 +4799,7 @@ void cReplayControl::MarkMove(bool Forward)
{
int Current, Total;
if (GetIndex(Current, Total)) {
- cMark *m = marks.Get(Current);
- if (m) {
+ if (cMark *m = marks.Get(Current)) {
displayFrames = true;
int p = SkipFrames(Forward ? 1 : -1);
cMark *m2;
@@ -4878,7 +4875,7 @@ eOSState cReplayControl::ProcessKey(eKeys Key)
{
if (!Active())
return osEnd;
- if (Key == kNone)
+ if (Key == kNone && !marksModified)
marks.Update();
if (visible) {
if (timeoutShow && time(NULL) > timeoutShow) {