diff --git a/editor/opening_hours_ui.cpp b/editor/opening_hours_ui.cpp index f0984b5874..eca63646b5 100644 --- a/editor/opening_hours_ui.cpp +++ b/editor/opening_hours_ui.cpp @@ -195,7 +195,9 @@ bool TimeTable::SetOpeningTime(osmoh::Timespan const & span) bool TimeTable::CanAddExcludeTime() const { - return !GetPredefinedExcludeTime().IsEmpty(); + auto copy = *this; + return copy.AddExcludeTime(GetPredefinedExcludeTime()) && + copy.GetExcludeTime().size() == GetExcludeTime().size() + 1; } bool TimeTable::AddExcludeTime(osmoh::Timespan const & span)