You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tde-construct/libs/qt-x11-free/files/0015-qiconview-finditem.patch

44 lines
1.5 KiB

qt-bugs@ issue : 18886
applied: no
author: Pascal Létourneau <pletourn@globetrotter.net>
QIconView::findItem() should always search all ItemContainer to find the best
match.
Example:
----- -----
| | | | ItemContainer
--------------------------------------
| | | | boundary
| | ----- | |
| | | | | |
----- ----- -----
item1 item2 item3
Right now, the focus goes from item1 to item3 when you press Key_Right.
[ Since the mail was sent, I added the diff 'contains -> intersects' ]
Index: src/iconview/qiconview.cpp
===================================================================
RCS file: /home/kde/qt-copy/src/iconview/qiconview.cpp,v
retrieving revision 1.47
diff -u -3 -p -r1.47 qiconview.cpp
--- work/qt-x11-free-3.3.8/src/iconview/qiconview.cpp 16 May 2003 13:02:38 -0000 1.47
+++ work/qt-x11-free-3.3.8/src/iconview/qiconview.cpp 30 May 2003 20:32:34 -0000
@@ -5200,11 +5201,11 @@ QIconViewItem* QIconView::findItem( Dire
d->findContainers( dir, relativeTo, searchRect);
cList->first();
- while ( cList->current() && !centerMatch ) {
+ while ( cList->current() ) {
QPtrList<QIconViewItem> &list = (cList->current())->items;
for ( item = list.first(); item; item = list.next() ) {
if ( neighbourItem( dir, relativeTo, item ) &&
- searchRect.contains( item->rect().center() ) &&
+ searchRect.intersects( item->rect() ) &&
item != currentItem() ) {
int ml = (relativeTo - item->rect().center()).manhattanLength();
if ( centerMatch ) {