author | zautrix <zautrix> | 2005-01-21 15:38:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-21 15:38:31 (UTC) |
commit | 4afdcfcac216b428ada79f4750cf7447e3175333 (patch) (side-by-side diff) | |
tree | 8f70936ac23137c3f6fb00fce33edbfe3d821f59 /microkde/kdeui | |
parent | 234b9425bebd41b556277cdd94138fafecc32b45 (diff) | |
download | kdepimpi-4afdcfcac216b428ada79f4750cf7447e3175333.zip kdepimpi-4afdcfcac216b428ada79f4750cf7447e3175333.tar.gz kdepimpi-4afdcfcac216b428ada79f4750cf7447e3175333.tar.bz2 |
some fixes
-rw-r--r-- | microkde/kdeui/klistview.cpp | 12 |
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); } |