summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorgeneralevent.cpp24
-rw-r--r--korganizer/koeditorgeneralevent.h1
2 files changed, 14 insertions, 11 deletions
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp
index 42c3df1..fc5be71 100644
--- a/korganizer/koeditorgeneralevent.cpp
+++ b/korganizer/koeditorgeneralevent.cpp
@@ -52,2 +52,3 @@ KOEditorGeneralEvent::KOEditorGeneralEvent(QObject* parent,
{
+ mTemplate = false;
connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)),
@@ -177,4 +178,4 @@ void KOEditorGeneralEvent::setDateTimes(QDateTime start, QDateTime end)
// kdDebug() << "KOEditorGeneralEvent::setDateTimes(): Start DateTime: " << start.toString() << endl;
-
- mStartDateEdit->setDate(start.date());
+ if ( !mTemplate )
+ mStartDateEdit->setDate(start.date());
// KTimeEdit seems to emit some signals when setTime() is called.
@@ -183,3 +184,4 @@ void KOEditorGeneralEvent::setDateTimes(QDateTime start, QDateTime end)
mStartTimeEdit->blockSignals( false );
- mEndDateEdit->setDate(end.date());
+ if ( !mTemplate )
+ mEndDateEdit->setDate(end.date());
mEndTimeEdit->setTime(end.time());
@@ -263,10 +265,10 @@ void KOEditorGeneralEvent::readEvent( Event *event, bool tmpl )
- if ( !tmpl ) {
- // the rest is for the events only
- mNoTimeButton->setChecked(event->doesFloat());
- timeStuffDisable(event->doesFloat());
-
- setDateTimes(event->dtStart(),event->dtEnd());
- }
-
+ mTemplate = tmpl;
+ // the rest is for the events only
+ mNoTimeButton->setChecked(event->doesFloat());
+ timeStuffDisable(event->doesFloat());
+
+ setDateTimes(event->dtStart(),event->dtEnd());
+
+ mTemplate = false;
switch( event->transparency() ) {
diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h
index 188dc93..0174788 100644
--- a/korganizer/koeditorgeneralevent.h
+++ b/korganizer/koeditorgeneralevent.h
@@ -92,2 +92,3 @@ class KOEditorGeneralEvent : public KOEditorGeneral
private:
+ bool mTemplate;
QLabel *mStartDateLabel;