summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2018-02-01 16:08:15 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2018-02-01 16:08:15 +0100
commitc71c3115cca09935b4b6770311958cb7ac8ce9f4 (patch)
treee5d6fd1e556a9f6f744f2c9b322eba8c8734799b /menu.c
parent5ae8d1a7a30139d714334ecbed81b936885f75ce (diff)
downloadvdr-c71c3115cca09935b4b6770311958cb7ac8ce9f4.tar.gz
vdr-c71c3115cca09935b4b6770311958cb7ac8ce9f4.tar.bz2
Fixed handling editing marks in the replay progress display, in case the marks are deleted via the Info/Edit menu of the currently played recording
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/menu.c b/menu.c
index bbaa0bab..e69f4db6 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.56 2018/01/29 13:59:58 kls Exp $
+ * $Id: menu.c 4.57 2018/02/01 15:48:54 kls Exp $
*/
#include "menu.h"
@@ -2699,7 +2699,7 @@ eOSState cMenuRecordingEdit::DeleteMarks(void)
if (cControl *Control = cControl::Control(true)) {
if (const cRecording *Recording = Control->GetRecording()) {
if (strcmp(recording->FileName(), Recording->FileName()) == 0)
- cStatus::MsgMarksModified(NULL);
+ Control->ClearEditingMarks();
}
}
}
@@ -5578,6 +5578,16 @@ void cReplayControl::Stop(void)
cMenuRecordings::SetRecording(NULL); // make sure opening the Recordings menu navigates to the last replayed recording
}
+void cReplayControl::ClearEditingMarks(void)
+{
+ cStateKey StateKey;
+ marks.Lock(StateKey);
+ while (cMark *m = marks.First())
+ marks.Del(m);
+ StateKey.Remove();
+ cStatus::MsgMarksModified(NULL);
+}
+
void cReplayControl::SetRecording(const char *FileName)
{
fileName = FileName;