Bug 72527

Summary: Cancelling a new event when more than one Calendar are visible gives odd behavior
Product: [Applications] korganizer Reporter: Jose Hernandez <code>
Component: generalAssignee: Cornelius Schumacher <schumacher>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Jose Hernandez 2004-01-13 07:49:30 UTC
Version:           3.2 (using KDE 3.1.94 (CVS >= 20031206), compiled sources)
Compiler:          gcc version 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r3, propolice)
OS:          Linux (i686) release 2.6.0-gentoo

make sure there are two Calendars visible.

1) click add new event
2) enter a title
3) Click OK or Apply

the Calendar selection dialog pops up

3) click Cancel

notice the event is added to the visible calendar screen.

4) click OK or Cancel

notice the event remains

5) uncheck and recheck the visible calendars

notice the event disappears
Comment 1 Reinhold Kainhofer 2004-01-16 15:37:38 UTC
Subject: osnabrueck_branch: kdepim/korganizer

CVS commit by kainhofe: 

If you had multiple writeable resources and you added an event, but pressed cancel on the resource selection dialog (so the item won't be added to the calendar), the agenda item was still added to the view. This no longer happens.

CCMAIL: 72527-done@bugs.kde.org


  M +3 -3      koeventeditor.cpp   1.63.2.2


--- kdepim/korganizer/koeventeditor.cpp  #1.63.2.1:1.63.2.2
@@ -260,7 +260,7 @@ bool KOEventEditor::processInput()
     mEvent->setOrganizer( KOPrefs::instance()->email() );
     writeEvent( mEvent );
-    if( !KOPrefs::instance()->mUseGroupwareCommunication ||
-        KOGroupware::instance()->sendICalMessage( this, KCal::Scheduler::Request, mEvent ) ) {
-      mCalendar->addEvent( mEvent );
+    if( (!KOPrefs::instance()->mUseGroupwareCommunication ||
+        KOGroupware::instance()->sendICalMessage( this, KCal::Scheduler::Request, mEvent ) ) &&
+        mCalendar->addEvent( mEvent ) ) {
       emit eventAdded( mEvent );
     } else {