diff options
Diffstat (limited to 'lumina-desktop')
-rw-r--r-- | lumina-desktop/LDesktop.cpp | 8 | ||||
-rw-r--r-- | lumina-desktop/LPanel.cpp | 1 | ||||
-rw-r--r-- | lumina-desktop/LPanel.h | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/lumina-desktop/LDesktop.cpp b/lumina-desktop/LDesktop.cpp index b119781e..3fbb15f0 100644 --- a/lumina-desktop/LDesktop.cpp +++ b/lumina-desktop/LDesktop.cpp @@ -388,7 +388,9 @@ void LDesktop::UpdatePanels(){ if(panels==-1 && defaultdesktop){ panels=1; } //need at least 1 panel on the primary desktop //Remove all extra panels for(int i=0; i<PANELS.length(); i++){ + qDebug() << " -- panel:" << i << PANELS[i]->number(); if(panels <= PANELS[i]->number()){ + if(DEBUG){ qDebug() << " -- Remove Panel:" << PANELS[i]->number(); } delete PANELS.takeAt(i); i--; } @@ -396,12 +398,12 @@ void LDesktop::UpdatePanels(){ for(int i=0; i<panels; i++){ //Check for a panel with this number bool found = false; - for(int p=0; p<PANELS.length(); p++){ + for(int p=0; p<PANELS.length() && !found; p++){ if(PANELS[p]->number() == i){ found = true; - //qDebug() << " -- Update panel "<< i; + if(DEBUG){ qDebug() << " -- Update panel "<< i; } //panel already exists - just update it - QTimer::singleShot(0, PANELS[i], SLOT(UpdatePanel()) ); + QTimer::singleShot(0, PANELS[p], SLOT(UpdatePanel()) ); } } if(!found){ diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp index 09ddb412..9bb42ae6 100644 --- a/lumina-desktop/LPanel.cpp +++ b/lumina-desktop/LPanel.cpp @@ -20,6 +20,7 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){ tmp->addWidget(panelArea); settings = file; screennum = scr; + panelnum = num; //save for later screen = LSession::desktop(); PPREFIX = "panel"+QString::number(screennum)+"."+QString::number(num)+"/"; defaultpanel = (screen->screenGeometry(screennum).x()==0 && num==0); diff --git a/lumina-desktop/LPanel.h b/lumina-desktop/LPanel.h index 29911127..b7b89d71 100644 --- a/lumina-desktop/LPanel.h +++ b/lumina-desktop/LPanel.h @@ -38,6 +38,7 @@ private: QPoint hidepoint, showpoint; //for hidden panels: locations when hidden/visible bool defaultpanel, horizontal, hidden; int screennum; + int panelnum; QList<LPPlugin*> PLUGINS; public: @@ -45,7 +46,7 @@ public: ~LPanel(); int number(){ - return PPREFIX.section(".",-1).toInt(); + return panelnum; } public slots: |