mirror of https://github.com/Icinga/icinga2.git
Merge pull request #6386 from Icinga/fix/timeperiods-do-not-clear-after-restart
Fix that TimePeriod segments are not cleared on restart
This commit is contained in:
commit
3fc3d86fbb
|
@ -237,7 +237,9 @@ void TimePeriod::Merge(const TimePeriod::Ptr& timeperiod, bool include)
|
||||||
|
|
||||||
void TimePeriod::UpdateRegion(double begin, double end, bool clearExisting)
|
void TimePeriod::UpdateRegion(double begin, double end, bool clearExisting)
|
||||||
{
|
{
|
||||||
if (!clearExisting) {
|
if (clearExisting) {
|
||||||
|
SetSegments(new Array());
|
||||||
|
} else {
|
||||||
if (begin < GetValidEnd())
|
if (begin < GetValidEnd())
|
||||||
begin = GetValidEnd();
|
begin = GetValidEnd();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue