From a20f235a319f6bb02f42b600eb8371b8b8a8443a Mon Sep 17 00:00:00 2001
From: Maximilian Gerhard <maxbox@directbox.com>
Date: Sat, 1 Oct 2011 00:48:04 +0200
Subject: remove all panels first, before creating a new one

---
 plasma-desktop/updates/01-kanotix-default-setup.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/plasma-desktop/updates/01-kanotix-default-setup.js b/plasma-desktop/updates/01-kanotix-default-setup.js
index de6e691..eaec917 100644
--- a/plasma-desktop/updates/01-kanotix-default-setup.js
+++ b/plasma-desktop/updates/01-kanotix-default-setup.js
@@ -5,8 +5,10 @@ if (locked) {
     locked = false
 }
 
-p = panelById(panelIds[0]);
-if (typeof p === "panel") {
+// remove all panels from desktop
+pIds = panelIds;
+for (i = 0; i < pIds.length; ++i) {
+    p = panelById(pIds[i]);
     p.remove();
 }
 
-- 
cgit v1.0