aboutsummaryrefslogtreecommitdiff
path: root/lumina-config
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-config')
-rw-r--r--lumina-config/mainUI.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/lumina-config/mainUI.cpp b/lumina-config/mainUI.cpp
index 8bcb4f40..744d4bdf 100644
--- a/lumina-config/mainUI.cpp
+++ b/lumina-config/mainUI.cpp
@@ -901,8 +901,13 @@ void MainUI::adjustpanel1(){
if(loading || panadjust){ return; }
panadjust = true;
qDebug() << "Adjust Panel 1:";
- ui->toolBox_panel1->setCurrentIndex( ui->toolBox_panel2->currentIndex() );
- bool changed = false;
+ bool valchanged = ui->toolBox_panel1->currentIndex()==ui->toolBox_panel2->currentIndex();
+ if(!valchanged){
+ //Just a toolbox page change - switch to match and exit
+ ui->toolBox_panel1->setCurrentIndex( ui->toolBox_panel2->currentIndex() );
+ panadjust = false;
+ return;
+ }
int newindex=0;
switch(ui->combo_panel2_loc->currentIndex()){
case 0:
@@ -915,11 +920,11 @@ void MainUI::adjustpanel1(){
newindex = 2; break;
}
if(newindex != ui->combo_panel1_loc->currentIndex()){
- changed = true;
+ valchanged = true;
ui->combo_panel1_loc->setCurrentIndex(newindex);
}
panadjust = false;
- if(!loading){ ui->push_save->setEnabled(true); modpan = true; }
+ if(!loading && valchanged){ ui->push_save->setEnabled(true); modpan = true; }
}
void MainUI::adjustpanel2(){
@@ -927,8 +932,14 @@ void MainUI::adjustpanel2(){
panadjust = true;
//Adjust panel 2 to complement a panel 1 change
qDebug() << "Adjust Panel 2:";
- ui->toolBox_panel2->setCurrentIndex( ui->toolBox_panel1->currentIndex() );
- bool changed = false;
+ bool valchanged = ui->toolBox_panel1->currentIndex()==ui->toolBox_panel2->currentIndex();
+ if(!valchanged){
+ //Just a toolbox page change - switch to match and exit
+ ui->toolBox_panel2->setCurrentIndex( ui->toolBox_panel1->currentIndex() );
+ panadjust = false;
+ return;
+ }
+
int newindex=0;
switch(ui->combo_panel1_loc->currentIndex()){
case 0:
@@ -941,11 +952,11 @@ void MainUI::adjustpanel2(){
newindex = 2; break;
}
if(newindex != ui->combo_panel2_loc->currentIndex()){
- changed = true;
+ valchanged = true;
ui->combo_panel2_loc->setCurrentIndex(newindex);
}
panadjust = false;
- if(!loading && changed){ ui->push_save->setEnabled(true); modpan = true; }
+ if(!loading && valchanged){ ui->push_save->setEnabled(true); modpan = true; }
}
bgstack15