[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    [Bug 87857] Selecting an email and pressing delete is unnessarily
From:       Ismail Onur Filiz <onurf () su ! sabanciuniv ! edu>
Date:       2006-04-25 8:38:54
Message-ID: 20060425083854.5360.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=87857         




------- Additional Comments From onurf su sabanciuniv edu  2006-04-25 10:38 -------
I had a look at your patch, but changing the function the way you do is a bit \
problematic, although I see where you are coming from. The msgRemoved slot calls \
prepareMove, which causes the O(n^2) problem you have indicated if all messages are \
selected (and thus prepareMove returns 0). Nevertheless, a few other functions also \
call this function, and the problem is they assume that prepareMove returns an \
unselected message if it returns anything non-zero. To obtain some visual artifacts \
with your patch for instance, say that there are 5 messages 1,2,3,4,5 in a folder. \
With ctrl, select 2,4,3 in that order, and move them to another folder with the \
right-click menu. The strike-throughs won't be properly drawn.

I'm thinking the following might be a better solution:
Index: kmheaders.cpp
===================================================================
--- kmheaders.cpp       (revision 532874)
+++ kmheaders.cpp       (working copy)
 @ -1457,8 +1457,9  @ void KMHeaders::finalizeMove( HeaderItem
 {
   emit selected( 0 );

+  clearSelection();
+
   if ( item ) {
-    clearSelection();
     setCurrentItem( item );
     setSelected( item, true );
     setSelectionAnchor( currentItem() );

Since when all messages in a folder are selected, item will be zero, which in turn \
will clear the selection, which in turn should bypass the while loops in prepareMove \
in the next call. Nevertheless, I'm too sleepy right now to clearly think whether \
this is true, so I will leave some of the work to you Marek:) \
_______________________________________________ KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic