summaryrefslogtreecommitdiffabout
path: root/microkde
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
parent234b9425bebd41b556277cdd94138fafecc32b45 (diff)
downloadkdepimpi-4afdcfcac216b428ada79f4750cf7447e3175333.zip
kdepimpi-4afdcfcac216b428ada79f4750cf7447e3175333.tar.gz
kdepimpi-4afdcfcac216b428ada79f4750cf7447e3175333.tar.bz2
some fixes
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdeui/klistview.cpp14
1 files changed, 11 insertions, 3 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)
{
- // qDebug("KListView::emitContextMenu col");
- emit contextRequest( i, p, col );
- emit contextMenu (this, i, p);
+ QListViewItem* item = i;
+ int c = col;
+ // do not trust the values for QListViewItem* i and int col;
+ // qDebug("KListView::emitContextMenu col");
+ 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);
}