summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditorgeneraltodo.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koeditorgeneraltodo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorgeneraltodo.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index 10d9a8c..d32d5a5 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -207,14 +207,9 @@ void KOEditorGeneralTodo::setDefaults(QDateTime due,bool allDay)
mLocationEdit->load(KOLocationBox::LOCATION);
KOEditorGeneral::setDefaults(allDay);
mTimeButton->setChecked( !allDay );
- if(mTimeButton->isChecked()) {
- mTimeButton->setEnabled(true);
- }
- else {
- mTimeButton->setEnabled(false);
- }
+ mTimeButton->setEnabled( !allDay );
enableTimeEdits( !allDay );
if ( due.isValid() ) {
mDueCheck->setChecked(true);
@@ -251,15 +246,18 @@ void KOEditorGeneralTodo::readTodo(Todo *todo)
mLocationEdit->load(KOLocationBox::LOCATION);
KOEditorGeneral::readIncidence(todo);
QDateTime dueDT;
+ mTimeButton->setChecked( !todo->doesFloat() );
+ mTimeButton->setEnabled( !todo->doesFloat() );
if (todo->hasDueDate()) {
enableAlarmEdit(true);
dueDT = todo->dtDue();
mDueDateEdit->setDate(todo->dtDue().date());
mDueTimeEdit->setTime(todo->dtDue().time());
mDueCheck->setChecked(true);
+ mTimeButton->setEnabled( true );
} else {
alarmDisable(true);
mDueDateEdit->setEnabled(false);
mDueTimeEdit->setEnabled(false);
@@ -271,17 +269,17 @@ void KOEditorGeneralTodo::readTodo(Todo *todo)
if (todo->hasStartDate()) {
mStartDateEdit->setDate(todo->dtStart().date());
mStartTimeEdit->setTime(todo->dtStart().time());
mStartCheck->setChecked(true);
+ mTimeButton->setEnabled( true );
} else {
mStartDateEdit->setEnabled(false);
mStartTimeEdit->setEnabled(false);
mStartDateEdit->setDate(QDate::currentDate());
mStartTimeEdit->setTime(QTime::currentTime());
mStartCheck->setChecked(false);
}
- mTimeButton->setChecked( !todo->doesFloat() );
mCompletedCombo->setCurrentItem(todo->percentComplete() / 20);
if (todo->isCompleted() && todo->hasCompletedDate()) {
mCompleted = todo->completed();