┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dolphinremoveaction.cpp3
-rw-r--r--src/views/dolphinview.cpp6
2 files changed, 8 insertions, 1 deletions
diff --git a/src/dolphinremoveaction.cpp b/src/dolphinremoveaction.cpp
index 200fc407d..7d7c2f043 100644
--- a/src/dolphinremoveaction.cpp
+++ b/src/dolphinremoveaction.cpp
@@ -53,8 +53,9 @@ void DolphinRemoveAction::update()
setText(i18nc("@action:inmenu", "&Move to Trash"));
}
- if (m_action) {
+ if (m_action) {
setIcon(m_action->icon());
setShortcuts(m_action->shortcuts());
+ setEnabled(m_action->isEnabled());
}
}
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index e879f67fc..fa43656c1 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -850,6 +850,12 @@ void DolphinView::slotItemMiddleClicked(int index)
void DolphinView::slotItemContextMenuRequested(int index, const QPointF& pos)
{
+ // Force emit of a selection changed signal before we request the
+ // context menu, to update the edit-actions first. (See Bug 294013)
+ if (m_selectionChangedTimer->isActive()) {
+ emitSelectionChangedSignal();
+ }
+
const KFileItem item = m_model->fileItem(index);
emit requestContextMenu(pos.toPoint(), item, url(), QList<QAction*>());
}