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 | |
parent | 234b9425bebd41b556277cdd94138fafecc32b45 (diff) | |
download | kdepimpi-4afdcfcac216b428ada79f4750cf7447e3175333.zip kdepimpi-4afdcfcac216b428ada79f4750cf7447e3175333.tar.gz kdepimpi-4afdcfcac216b428ada79f4750cf7447e3175333.tar.bz2 |
some fixes
-rw-r--r-- | microkde/kdeui/klistview.cpp | 14 |
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 @@ -1909,9 +1909,17 @@ void KListView::emitContextMenu (KListView*, QListViewItem* i) 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); } void KListView::setAcceptDrops (bool val) |