Commit 3a006a93 authored by Laurent Montel's avatar Laurent Montel 😁

Disable action by default when it depends against text selection

parent 5a677af8
......@@ -105,6 +105,8 @@ QHash<MessageComposer::ActionType::Type, QList<QAction *> > KMailPluginEditorMan
MessageComposer::ActionType::Type type = actionType.type();
const bool needSelectedText = interface->needSelectedText();
if (needSelectedText) {
//Disable by default as we don't have selection by default.
connect(this, &KMailPluginEditorManagerInterface::textSelectionChanged, actionType.action(), &QAction::setEnabled);
QList<QAction *> lst = mActionHash.value(type);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment