summaryrefslogtreecommitdiff
path: root/svdrp.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2020-04-11 09:22:05 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2020-04-11 09:22:05 +0200
commit6e0f5287ea4df66847f97489f00f2c8214bad605 (patch)
tree6f37287dcaa4c1889072f16760a917d4adf93aca /svdrp.c
parentf63a066b98039663ff35d21fd42a66eb143d93ab (diff)
downloadvdr-6e0f5287ea4df66847f97489f00f2c8214bad605.tar.gz
vdr-6e0f5287ea4df66847f97489f00f2c8214bad605.tar.bz2
Fixed moving channels between number groups in SVDRP's MOVC command and the Channels menu, in case a channel is moved to a higher number and into a numbered group
Diffstat (limited to 'svdrp.c')
-rw-r--r--svdrp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/svdrp.c b/svdrp.c
index 861a0835..46bd9a1a 100644
--- a/svdrp.c
+++ b/svdrp.c
@@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection.
*
- * $Id: svdrp.c 4.39 2019/05/06 15:11:15 kls Exp $
+ * $Id: svdrp.c 4.40 2020/04/11 09:22:05 kls Exp $
*/
#include "svdrp.h"
@@ -2087,6 +2087,8 @@ void cSVDRPServer::CmdMOVC(const char *Option)
int FromNumber = FromChannel->Number();
int ToNumber = ToChannel->Number();
if (FromNumber != ToNumber) {
+ if (Channels->MoveNeedsDecrement(FromChannel, ToChannel))
+ ToChannel = Channels->Prev(ToChannel); // cListBase::Move() doesn't know about the channel list's numbered groups!
Channels->Move(FromChannel, ToChannel);
Channels->ReNumber();
Channels->SetModifiedByUser();