From 512aecb8034f720c30c5d89ecef1528ba22c9b1c Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 30 Oct 2013 18:37:40 +0100 Subject: [PATCH] removing panels works --- src/shell/panelview.cpp | 3 +++ src/shell/shellcorona.cpp | 10 ++++++++++ 2 files changed, 13 insertions(+) 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;