From 2e108ec3a1583da14b237a1bb2d210206bfc1dcc Mon Sep 17 00:00:00 2001 From: Patrick Linstruth Date: Sat, 12 Jan 2019 13:26:48 -0800 Subject: [PATCH] Fixed bug where cloning a clock line could cross hour boundary. --- ChangeLog | 3 +++ rdlogmanager/edit_clock.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index add82b3f..49fc5457 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18369,3 +18369,6 @@ notifications. 2019-01-11 Fred Gleason * Incremented the package version to 3.0.0alpha05. +2019-01-13 Patrick Linstruth + * Fixed a bug in RDLogManager that allowed cloned clock lines to pass + hour mark. diff --git a/rdlogmanager/edit_clock.cpp b/rdlogmanager/edit_clock.cpp index eb4a15b5..74fe614f 100644 --- a/rdlogmanager/edit_clock.cpp +++ b/rdlogmanager/edit_clock.cpp @@ -350,6 +350,9 @@ void EditClock::cloneData() eventline.setName(selectedEventLine->name()); eventline.setStartTime(selectedEventLine->startTime().addMSecs(selectedEventLine->length())); eventline.setLength(selectedEventLine->length()); + if(eventline.startTime().addMSecs(eventline.length()).hour()) { + eventline.setLength(0); + } EditEventLine *edit_eventline= new EditEventLine(&eventline,edit_clock,-1,this);