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.
wilder-5.26
Fushan Wen 4 years ago
parent 9e1cfd57df
commit 3ff3cea11b
No known key found for this signature in database
GPG Key ID: 2E48D1487C91DCAA
  1. 3
      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

Loading…
Cancel
Save