We shouldn't take "lock widgets" from corona, but only from containment
It is up to the Containment to decide if the user is allowed or not to lock/unluck the widgets, so corona should not add one when there is none (user is not allow) and it shouldn't add another one when there is already one. Fixes duplicated action in toolbox.
This commit is contained in:
parent
cddee3cbf2
commit
47fe1f7497
@ -556,6 +556,13 @@ QList<QObject*> ContainmentInterface::actions() const
|
|||||||
}
|
}
|
||||||
foreach (QAction *a, containment()->corona()->actions()->actions()) {
|
foreach (QAction *a, containment()->corona()->actions()->actions()) {
|
||||||
if (a->isEnabled()) {
|
if (a->isEnabled()) {
|
||||||
|
if (a->objectName() == QStringLiteral("lock widgets")) {
|
||||||
|
//It is up to the Containment to decide if the user is allowed or not
|
||||||
|
//to lock/unluck the widgets, so corona should not add one when there is none
|
||||||
|
//(user is not allow) and it shouldn't add another one when there is already
|
||||||
|
//one
|
||||||
|
continue;
|
||||||
|
}
|
||||||
actions.insert(a->data().toInt(), a);
|
actions.insert(a->data().toInt(), a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user