summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeditorgeneralevent.cpp8
-rw-r--r--korganizer/koeditorgeneralevent.h1
2 files changed, 6 insertions, 3 deletions
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp
index 42c3df1..fc5be71 100644
--- a/korganizer/koeditorgeneralevent.cpp
+++ b/korganizer/koeditorgeneralevent.cpp
@@ -51,4 +51,5 @@ KOEditorGeneralEvent::KOEditorGeneralEvent(QObject* parent,
KOEditorGeneral( parent, name)
{
+ mTemplate = false;
connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)),
SLOT(setDuration()));
@@ -176,5 +177,5 @@ void KOEditorGeneralEvent::setDateTimes(QDateTime start, QDateTime end)
{
// kdDebug() << "KOEditorGeneralEvent::setDateTimes(): Start DateTime: " << start.toString() << endl;
-
+ if ( !mTemplate )
mStartDateEdit->setDate(start.date());
// KTimeEdit seems to emit some signals when setTime() is called.
@@ -182,4 +183,5 @@ void KOEditorGeneralEvent::setDateTimes(QDateTime start, QDateTime end)
mStartTimeEdit->setTime(start.time());
mStartTimeEdit->blockSignals( false );
+ if ( !mTemplate )
mEndDateEdit->setDate(end.date());
mEndTimeEdit->setTime(end.time());
@@ -262,5 +264,5 @@ void KOEditorGeneralEvent::readEvent( Event *event, bool tmpl )
QString tmpStr;
- if ( !tmpl ) {
+ mTemplate = tmpl;
// the rest is for the events only
mNoTimeButton->setChecked(event->doesFloat());
@@ -268,6 +270,6 @@ void KOEditorGeneralEvent::readEvent( Event *event, bool tmpl )
setDateTimes(event->dtStart(),event->dtEnd());
- }
+ mTemplate = false;
switch( event->transparency() ) {
case Event::Transparent:
diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h
index 188dc93..0174788 100644
--- a/korganizer/koeditorgeneralevent.h
+++ b/korganizer/koeditorgeneralevent.h
@@ -91,4 +91,5 @@ class KOEditorGeneralEvent : public KOEditorGeneral
private:
+ bool mTemplate;
QLabel *mStartDateLabel;
QLabel *mEndDateLabel;