patches/qt3-0005-qiconview-finditem.patch
author moinakg
Thu, 10 Jan 2008 18:27:45 +0000
changeset 782 a013313b88b4
permissions -rw-r--r--
QT3 Spec file and patches, initial revision.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
782
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     1
--- qt-x11-free-3.3.8/src/iconview/qiconview.cpp.orig	2007-02-02 19:31:07.000000000 +0530
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     2
+++ qt-x11-free-3.3.8/src/iconview/qiconview.cpp	2008-01-08 22:34:57.430570431 +0530
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     3
@@ -5245,11 +5245,11 @@
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     4
 	d->findContainers( dir, relativeTo, searchRect);
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     5
 
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     6
     cList->first();
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     7
-    while ( cList->current() && !centerMatch ) {
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     8
+    while ( cList->current() ) {
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
     9
 	QPtrList<QIconViewItem> &list = (cList->current())->items;
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    10
 	for ( item = list.first(); item; item = list.next() ) {
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    11
 	    if ( neighbourItem( dir, relativeTo, item ) &&
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    12
-		 searchRect.contains( item->rect().center() ) &&
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    13
+		 searchRect.intersects( item->rect() ) &&
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    14
 		 item != currentItem() ) {
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    15
  		int ml = (relativeTo - item->rect().center()).manhattanLength();
a013313b88b4 QT3 Spec file and patches, initial revision.
moinakg
parents:
diff changeset
    16
 		if ( centerMatch ) {