Bug 68160 - after adding an event which doesn't satisfy filter criterion, it is shown although it shouldn't be
Summary: after adding an event which doesn't satisfy filter criterion, it is shown alt...
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Cornelius Schumacher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-14 01:34 UTC by Andy Neitzke
Modified: 2003-11-16 01:39 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Neitzke 2003-11-14 01:34:36 UTC
Version:           3.2 alpha1 (using KDE 3.1.93 (CVS >= 20031111), Mandrake Linux Cooker i586 - Cooker)
Compiler:          gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-4mdk)
OS:          Linux (i686) release 2.4.21-0.13mdk

My default filter excludes a particular event category.  If I add an event in that category with the default filter active, that event is visible in the agenda view immediately after being added.  After moving to a different day and then coming back, the event is (correctly) not shown in the agenda view.

I'm pretty sure that KDE 3.1.4 didn't do this.  I suppose that this new behavior could be considered to be an improvement, since it allows a little bit of visual feedback to confirm that the event has been correctly added, but I think it is sort of disconcerting to see only one event that doesn't satisfy the filter criterion while the others remain invisible (and then have the newly-added event disappear when the view gets updated!)
Comment 1 Cornelius Schumacher 2003-11-16 01:39:49 UTC
Subject: kdepim/korganizer

CVS commit by cschumac: 

Apply filter to new events before showing them.

CCMAIL: 68160-done@bugs.kde.org


  M +3 -0      koagendaview.cpp   1.125


--- kdepim/korganizer/koagendaview.cpp  #1.124:1.125
@@ -50,4 +50,5 @@
 #include <libkcal/icaldrag.h>
 #include <libkcal/dndfactory.h>
+#include <libkcal/calfilter.h>
 
 #include <kcalendarsystem.h>
@@ -854,4 +855,6 @@ void KOAgendaView::insertEvent( Event *e
 void KOAgendaView::changeEventDisplayAdded( Event *event )
 {
+  if ( !calendar()->filter()->filterEvent( event ) ) return;
+
   if ( !event->doesRecur() ) {
     // find a suitable date