author | zautrix <zautrix> | 2005-07-27 22:26:08 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-27 22:26:08 (UTC) |
commit | 0e38cffd7ba745f237c659e1c48080fcb25b126c (patch) (side-by-side diff) | |
tree | 6069600e18bae5300c6ce427735457dbfed93141 /korganizer/koeditorrecurrence.cpp | |
parent | 136f9082862e7a56abb3a201e96f5e7386c4f1b9 (diff) | |
download | kdepimpi-0e38cffd7ba745f237c659e1c48080fcb25b126c.zip kdepimpi-0e38cffd7ba745f237c659e1c48080fcb25b126c.tar.gz kdepimpi-0e38cffd7ba745f237c659e1c48080fcb25b126c.tar.bz2 |
rec changes
Diffstat (limited to 'korganizer/koeditorrecurrence.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | korganizer/koeditorrecurrence.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/korganizer/koeditorrecurrence.cpp b/korganizer/koeditorrecurrence.cpp index de4e4f7..89504db 100644 --- a/korganizer/koeditorrecurrence.cpp +++ b/korganizer/koeditorrecurrence.cpp @@ -898,8 +898,7 @@ void KOEditorRecurrence::readEvent(Incidence *event) setDateTimes( event->dtStart(), dtEnd ); - Recurrence *r = event->recurrence(); - int f = r->frequency(); - int recurs = r->doesRecur(); + + int recurs = event->doesRecur(); mEnabledCheck->setChecked( recurs ); @@ -907,5 +906,7 @@ void KOEditorRecurrence::readEvent(Incidence *event) int recurrenceType = RecurrenceChooser::Weekly; - + if ( recurs ) { + Recurrence *r = event->recurrence(); + int f = r->frequency(); switch ( recurs ) { case Recurrence::rNone: @@ -985,5 +986,5 @@ void KOEditorRecurrence::readEvent(Incidence *event) break; } - + } mRecurrenceChooser->setType( recurrenceType ); showCurrentRule( recurrenceType ); @@ -991,5 +992,6 @@ void KOEditorRecurrence::readEvent(Incidence *event) mRecurrenceRange->setDateTimes( event->dtStart() ); - if ( r->doesRecur() ) { + if ( event->doesRecur() ) { + Recurrence *r = event->recurrence(); mRecurrenceRange->setDuration( r->duration() ); if ( r->duration() == 0 ) @@ -1008,10 +1010,14 @@ void KOEditorRecurrence::readEvent(Incidence *event) void KOEditorRecurrence::writeEvent( Incidence *event ) { + + + if ( !mEnabledCheck->isChecked() ) { + if ( event->doesRecur() ) + event->recurrence()->unsetRecurs(); + } else { Recurrence *r = event->recurrence(); // clear out any old settings; r->unsetRecurs(); - - if ( mEnabledCheck->isChecked() ) { int duration = mRecurrenceRange->duration(); QDate endDate; |