diff options
| author | Peter Penz <[email protected]> | 2007-11-18 13:24:43 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-11-18 13:24:43 +0000 |
| commit | 8ee3363dbcc4d2e9e9f89b2737d26fcea55653a7 (patch) | |
| tree | e913777c1cf6c1114e0754623fe77cd9d4bc00ff /src/dolphiniconsview.cpp | |
| parent | afe7ee85836e824744dcab8b43f3999f1d6fa178 (diff) | |
fix crash for the following use case:
- open a view with no selection
- press SHIFT + right mouse-click on an item
- a context menu will be opened although no item has been selected -> assertion gets triggered later
svn path=/trunk/KDE/kdebase/apps/; revision=738255
Diffstat (limited to 'src/dolphiniconsview.cpp')
| -rw-r--r-- | src/dolphiniconsview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index 08ff9cf48..95ea011b0 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -162,7 +162,9 @@ QStyleOptionViewItem DolphinIconsView::viewOptions() const void DolphinIconsView::contextMenuEvent(QContextMenuEvent* event) { KCategorizedView::contextMenuEvent(event); - m_controller->triggerContextMenuRequest(event->pos()); + if (selectionModel()->hasSelection()) { + m_controller->triggerContextMenuRequest(event->pos()); + } } void DolphinIconsView::mousePressEvent(QMouseEvent* event) |
