Summary: | changing an event in the agenda view is not registered as a change (no undo, no mail to attendees, etc.) | ||
---|---|---|---|
Product: | [Applications] korganizer | Reporter: | Jason 'vanRijn' Kasper <vR> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hughwarrington |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Mandriva RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Jason 'vanRijn' Kasper
2005-08-05 20:56:09 UTC
Reassigning all KOrganizer bug reports and wishes to the newly created korganizer-devel mailing list. *** Bug 120721 has been marked as a duplicate of this bug. *** SVN commit 618657 by kainhofe: Correctly use the incidence changer to notify the korganizer core about the change when moving items in the agenda view. Previously, the event was changed, but korganizer wasn't notified, so no undo was available and no automatic groupware communication, as well as that the item wasn't even save in the dimap resource. All of these issues are now fixed by simply adding a call to mIncidenceChanger->changeIncidence(oldIncidence, incidence)... BUG: 110262 M +3 -3 koagenda.cpp M +8 -0 koagendaview.cpp --- branches/KDE/3.5/kdepim/korganizer/koagenda.cpp #618656:618657 @@ -1038,6 +1038,7 @@ void KOAgenda::endItemAction() { // kdDebug(5850) << "KOAgenda::endItemAction() " << endl; + mActionType = NOP; mScrollUpTimer.stop(); mScrollDownTimer.stop(); setCursor( arrowCursor ); @@ -1123,7 +1124,6 @@ if ( modify ) { mActionItem->endMove(); KOAgendaItem *placeItem = mActionItem->firstMultiItem(); - // FIXME: A mChanger->changeIncidence is missing here! if ( !placeItem ) { placeItem = mActionItem; } @@ -1141,7 +1141,8 @@ placeItem = placeItem->nextMultiItem(); } - // Notify about change, so that agenda view can update the event data + // Notify about change + // the agenda view will apply the changes to the actual Incidence*! emit itemModified( modif ); } // FIXME: If the change failed, we need to update the view! @@ -1149,7 +1150,6 @@ } mActionItem = 0; - mActionType = NOP; mItemMoved = false; if ( multiModify ) emit endMultiModify(); --- branches/KDE/3.5/kdepim/korganizer/koagendaview.cpp #618656:618657 @@ -972,6 +972,8 @@ Incidence *incidence = item->incidence(); if ( !incidence ) return; + if ( !mChanger || !mChanger->beginChange(incidence) ) return; + Incidence *oldIncidence = incidence->clone(); QTime startTime(0,0,0), endTime(0,0,0); if ( incidence->doesFloat() ) { @@ -997,6 +999,7 @@ Event*ev = static_cast<Event*>(incidence); if( incidence->dtStart() == startDt && ev->dtEnd() == endDt ) { // No change + delete oldIncidence; return; } incidence->setDtStart( startDt ); @@ -1011,6 +1014,7 @@ if( td->dtDue() == endDt ) { // No change + delete oldIncidence; return; } } @@ -1170,6 +1174,10 @@ td->setDtDue( endDt ); } + mChanger->changeIncidence( oldIncidence, incidence ); + mChanger->endChange(incidence); + delete oldIncidence; + item->setItemDate( startDt.date() ); KOIncidenceToolTip::remove( item ); |