Commit ba964b3b authored by Glen Ditchfield's avatar Glen Ditchfield 🐛
Browse files

Preserve datetimes of incidences created from templates

When the editor applies a template, as identified by the "isTemplate"
property, it (usually) does not copy its start/end/due datetimes;  it
keeps the datetimes set before the template was applied.  Unfortunately
when the instance is saved it still has the "isTemplate" property, and
so when it is edited the editor does not copy its datetimes; the GUI
fields are left with default values.  Removing the property fixes the
bug.

BUG: 332048
parent 5a1ab6d6
Pipeline #157992 passed with stage
in 1 minute and 44 seconds
......@@ -128,6 +128,7 @@ void IncidenceDateTime::load(const KCalendarCore::Incidence::Ptr &incidence)
}
const bool isTemplate = incidence->customProperty("kdepim", "isTemplate") == QLatin1String("true");
incidence->removeCustomProperty("kdepim", "isTemplate");
const bool templateOverridesTimes = incidenceHasDefaultTimes(mLoadedIncidence);
mLoadedIncidence = incidence;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment