KFileDialog/QIconView usability problem/bug

Alexander Neundorf neundorf at kde.org
Fri Sep 5 20:12:56 BST 2003


Hi,

I noticed the following: in single-click mode, it is not possible to select a 
directory using the mouse without entering it (i.e. holding Ctrl and pressing 
LMB, selects the dir and instantly enters it).
I didn't expect that ctrl+lmb changes the directory, I expected it would only 
select the dir. The reason is that in QIconView::contentsMouseReleaseEvent() 
clicked() is emitted no matter whether modifier keys are pressed or not.
How about this patch for kdelibs/kdeui/kiconview.cpp ?
I tried it and for me it seems to be ok.

void KIconView::contentsMouseReleaseEvent( QMouseEvent *e )
{
    d->doAutoSelect = TRUE;
+    if ((e->state() & ShiftButton)
+        || (e->state() & ControlButton)
+        || (e->state() & AltButton))
+       return;
    QIconView::contentsMouseReleaseEvent( e );
}

Bye
Alex
-- 
Work: alexander.neundorf at jenoptik.com - http://www.jenoptik-los.de
Home: neundorf at kde.org                - http://www.kde.org
      alex at neundorf.net               - http://www.neundorf.net





More information about the kde-core-devel mailing list