-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 | |||
@@ -1906,15 +1906,23 @@ void KListView::emitContextMenu (KListView*, QListViewItem* i) | |||
1906 | 1906 | ||
1907 | emit contextMenu (this, i, p); | 1907 | emit contextMenu (this, i, p); |
1908 | } | 1908 | } |
1909 | 1909 | ||
1910 | void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int col) | 1910 | void KListView::emitContextMenu (QListViewItem* i, const QPoint& p, int col) |
1911 | { | 1911 | { |
1912 | // qDebug("KListView::emitContextMenu col"); | 1912 | QListViewItem* item = i; |
1913 | emit contextRequest( i, p, col ); | 1913 | int c = col; |
1914 | emit contextMenu (this, i, p); | 1914 | // do not trust the values for QListViewItem* i and int col; |
1915 | // qDebug("KListView::emitContextMenu col"); | ||
1916 | if ( col == -1 ) { | ||
1917 | QPoint pp = viewport()->mapFromGlobal(p); | ||
1918 | item = itemAt( pp); | ||
1919 | c = header()->sectionAt(pp.x() ); | ||
1920 | } | ||
1921 | emit contextRequest( item, p, c ); | ||
1922 | emit contextMenu (this, item, p); | ||
1915 | } | 1923 | } |
1916 | 1924 | ||
1917 | void KListView::setAcceptDrops (bool val) | 1925 | void KListView::setAcceptDrops (bool val) |
1918 | { | 1926 | { |
1919 | QListView::setAcceptDrops (val); | 1927 | QListView::setAcceptDrops (val); |
1920 | viewport()->setAcceptDrops (val); | 1928 | viewport()->setAcceptDrops (val); |