summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui
authorzautrix <zautrix>2005-01-21 15:38:31 (UTC)
committer zautrix <zautrix>2005-01-21 15:38:31 (UTC)
commit4afdcfcac216b428ada79f4750cf7447e3175333 (patch) (side-by-side diff)
tree8f70936ac23137c3f6fb00fce33edbfe3d821f59 /microkde/kdeui
parent234b9425bebd41b556277cdd94138fafecc32b45 (diff)
downloadkdepimpi-4afdcfcac216b428ada79f4750cf7447e3175333.zip
kdepimpi-4afdcfcac216b428ada79f4750cf7447e3175333.tar.gz
kdepimpi-4afdcfcac216b428ada79f4750cf7447e3175333.tar.bz2
some fixes
Diffstat (limited to 'microkde/kdeui') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdeui/klistview.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/microkde/kdeui/klistview.cpp b/microkde/kdeui/klistview.cpp
index 6859d36..154cd02 100644
--- a/microkde/kdeui/klistview.cpp
+++ b/microkde/kdeui/klistview.cpp
@@ -1911,5 +1911,13 @@ void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int col)
{
+ QListViewItem* item = i;
+ int c = col;
+ // do not trust the values for QListViewItem* i and int col;
// qDebug("KListView::emitContextMenu col");
- emit contextRequest( i, p, col );
- emit contextMenu (this, i, p);
+ if ( col == -1 ) {
+ QPoint pp = viewport()->mapFromGlobal(p);
+ item = itemAt( pp);
+ c = header()->sectionAt(pp.x() );
+ }
+ emit contextRequest( item, p, c );
+ emit contextMenu (this, item, p);
}