aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core-utils
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core-utils')
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp9
-rw-r--r--src-qt5/core-utils/lumina-config/pages/page_interface_panels.h1
2 files changed, 4 insertions, 6 deletions
diff --git a/src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp b/src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp
index 9d940033..0e486bdd 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp
+++ b/src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp
@@ -101,16 +101,16 @@ void page_interface_panels::updateIcons(){
// PRIVATE SLOTS
//=================
void page_interface_panels::panelValChanged(){
- ui->tool_panels_add->setEnabled(panelnumber < 12);
+ ui->tool_panels_add->setEnabled(PANELS.length() < 12);
if(!loading){ settingChanged(); }
}
void page_interface_panels::newPanel(){
- if(panelnumber<0){ panelnumber=0; } //just in case
- panelnumber++;
+ //if(panelnumber<0){ panelnumber=0; } //just in case
+ //panelnumber++;
//Now create a new Panel widget with this number
PanelWidget *tmp = new PanelWidget(ui->scroll_panels->widget(), this, PINFO);
- tmp->LoadSettings(settings, cscreen, panelnumber-1);
+ tmp->LoadSettings(settings, cscreen, PANELS.length());
PANELS << tmp;
connect(tmp, SIGNAL(PanelChanged()), this, SLOT(panelValChanged()) );
connect(tmp, SIGNAL(PanelRemoved(int)), this, SLOT(removePanel(int)) );
@@ -138,6 +138,5 @@ void page_interface_panels::removePanel(int pan){
}
}
if(!changed){ return; } //nothing done
- panelnumber--;
panelValChanged();
}
diff --git a/src-qt5/core-utils/lumina-config/pages/page_interface_panels.h b/src-qt5/core-utils/lumina-config/pages/page_interface_panels.h
index 308bbd9a..2c7eda7a 100644
--- a/src-qt5/core-utils/lumina-config/pages/page_interface_panels.h
+++ b/src-qt5/core-utils/lumina-config/pages/page_interface_panels.h
@@ -32,7 +32,6 @@ private:
Ui::page_interface_panels *ui;
bool loading;
int cscreen; //current monitor/screen number
- int panelnumber; //current number of panels
QSettings *settings;
LPlugins *PINFO;
QList<PanelWidget*> PANELS;
bgstack15