From a0b7a71a94a7866af1c92cdb0e1e642dc8f9c27d Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Sun, 22 Apr 2018 12:51:19 +0200 Subject: [PATCH] [Containment Interface] Don't enter edit mode when immutable Opening the toolbox when widgets are locked reveals the widget handles but they're empty as all the actions are unavailable. Just refuse to enter edit mode then. Differential Revision: https://phabricator.kde.org/D12379 --- src/scriptengines/qml/plasmoid/containmentinterface.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/scriptengines/qml/plasmoid/containmentinterface.cpp b/src/scriptengines/qml/plasmoid/containmentinterface.cpp index 296a3f9c3..7e1821a38 100644 --- a/src/scriptengines/qml/plasmoid/containmentinterface.cpp +++ b/src/scriptengines/qml/plasmoid/containmentinterface.cpp @@ -422,6 +422,10 @@ void ContainmentInterface::setEditMode(bool edit) return; } + if (m_containment->immutability() != Plasma::Types::Mutable) { + return; + } + m_editMode = edit; emit editModeChanged(); }