diff --git a/src/shell/panelview.cpp b/src/shell/panelview.cpp index 878fa9b06..a0c272023 100644 --- a/src/shell/panelview.cpp +++ b/src/shell/panelview.cpp @@ -381,6 +381,9 @@ void PanelView::restore() connect(containment(), &Plasma::Containment::uiReadyChanged, this, &PanelView::setVisible); + connect(containment(), SIGNAL(destroyed(QObject *)), + this, SLOT(deleteLater())); + static const int MINSIZE = 10; m_offset = config().readEntry("offset", 0); diff --git a/src/shell/shellcorona.cpp b/src/shell/shellcorona.cpp index bb0b2b6b8..bb338a77e 100644 --- a/src/shell/shellcorona.cpp +++ b/src/shell/shellcorona.cpp @@ -720,6 +720,16 @@ void ShellCorona::addPanel(const QString &plugin) loc = availableLocations.first(); } panel->setLocation(loc); + switch (loc) { + case Plasma::Types::LeftEdge: + case Plasma::Types::RightEdge: + panel->setFormFactor(Plasma::Types::Vertical); + break; + default: + panel->setFormFactor(Plasma::Types::Horizontal); + break; + } + panel->setScreen(0); d->waitingPanels << panel;