diff options
author | william <william.os4y@gmail.com> | 2015-03-26 19:11:23 +0100 |
---|---|---|
committer | william <william.os4y@gmail.com> | 2015-03-26 19:11:23 +0100 |
commit | 82f05b571362bd52748c1fe1b1cd6ea2ef07f771 (patch) | |
tree | 6eda92367dc7e22f701b070d14b28ed82163934d /lumina-config | |
parent | display some filesystem's information on the statusbar in a thread safe manier (diff) | |
parent | Actually move the file/dir copy onto itself check earlier in the procedure, t... (diff) | |
download | lumina-82f05b571362bd52748c1fe1b1cd6ea2ef07f771.tar.gz lumina-82f05b571362bd52748c1fe1b1cd6ea2ef07f771.tar.bz2 lumina-82f05b571362bd52748c1fe1b1cd6ea2ef07f771.zip |
Merge remote-tracking branch 'upstream/master' into fmNumbers
Diffstat (limited to 'lumina-config')
-rw-r--r-- | lumina-config/mainUI.cpp | 27 |
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; } } |