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 @@ -899,6 +899,5 @@ void KOEditorRecurrence::readEvent(Incidence *event) - Recurrence *r = event->recurrence(); - int f = r->frequency(); - int recurs = r->doesRecur(); + + int recurs = event->doesRecur(); @@ -908,3 +907,5 @@ void KOEditorRecurrence::readEvent(Incidence *event) int recurrenceType = RecurrenceChooser::Weekly; - + if ( recurs ) { + Recurrence *r = event->recurrence(); + int f = r->frequency(); switch ( recurs ) { @@ -986,3 +987,3 @@ void KOEditorRecurrence::readEvent(Incidence *event) } - + } mRecurrenceChooser->setType( recurrenceType ); @@ -992,3 +993,4 @@ void KOEditorRecurrence::readEvent(Incidence *event) - if ( r->doesRecur() ) { + if ( event->doesRecur() ) { + Recurrence *r = event->recurrence(); mRecurrenceRange->setDuration( r->duration() ); @@ -1009,2 +1011,8 @@ void KOEditorRecurrence::writeEvent( Incidence *event ) { + + + if ( !mEnabledCheck->isChecked() ) { + if ( event->doesRecur() ) + event->recurrence()->unsetRecurs(); + } else { Recurrence *r = event->recurrence(); @@ -1013,4 +1021,2 @@ void KOEditorRecurrence::writeEvent( Incidence *event ) r->unsetRecurs(); - - if ( mEnabledCheck->isChecked() ) { int duration = mRecurrenceRange->duration(); |