From 0752ffe05ce1c4d22c8a51cfb628a2b0a311e307 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 26 Jul 2016 21:23:37 -0400 Subject: Fix up the panel numbering in the new lumina-config interface. --- src-qt5/core-utils/lumina-config/pages/page_interface_panels.cpp | 9 ++++----- src-qt5/core-utils/lumina-config/pages/page_interface_panels.h | 1 - 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 PANELS; -- cgit