Fix that TimePeriod segments are not cleared on restart

refs #6282
This commit is contained in:
Noah Hilverling 2018-06-19 10:30:34 +02:00
parent eb1f37905d
commit ea08c85424
1 changed files with 3 additions and 1 deletions

View File

@ -235,7 +235,9 @@ void TimePeriod::Merge(const TimePeriod::Ptr& timeperiod, bool include)
void TimePeriod::UpdateRegion(double begin, double end, bool clearExisting)
{
if (!clearExisting) {
if (clearExisting) {
SetSegments(new Array());
} else {
if (begin < GetValidEnd())
begin = GetValidEnd();