From 3ff3cea11b8965044736cc9f196056f4595740db Mon Sep 17 00:00:00 2001 From: Fushan Wen Date: Sun, 5 Jun 2022 16:10:11 +0800 Subject: [PATCH] shell/scripting: don't set formFactor again The formFactor has been set, either by `ShellCorona::addPanel` or the ctor of `ContainmentPrivate::ContainmentPrivate`, so it's redundant to set the default value here again, or the panel will be added to the top edge again and again. --- shell/scripting/scriptengine.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/shell/scripting/scriptengine.cpp b/shell/scripting/scriptengine.cpp index e242115b6..5d71aa157 100644 --- a/shell/scripting/scriptengine.cpp +++ b/shell/scripting/scriptengine.cpp @@ -396,9 +396,6 @@ Plasma::Containment *ScriptEngine::createContainment(const QString &type, const if (c) { if (type == QLatin1String("Panel")) { - // some defaults - c->setFormFactor(Plasma::Types::Horizontal); - c->setLocation(Plasma::Types::TopEdge); // we have to force lastScreen of the newly created containment, // or it won't have a screen yet at that point, breaking JS code // that relies on it