mirror of
https://github.com/epasveer/seer.git
synced 2026-08-30 17:10:44 +08:00
Fixed some recurion problem with 'readSettings' calling 'writeSettings'.
This commit is contained in:
@@ -173,20 +173,26 @@ void SeerStackManagerWidget::readSettings () {
|
||||
//qDebug() << "Current" << current;
|
||||
|
||||
// Move tabs to the requested order.
|
||||
for (int i=0; i<tabs.count(); i++) {
|
||||
// Ignore signals from the tabbar as these will call 'writeSettings'
|
||||
// while we're in 'readSettings'.
|
||||
{
|
||||
QSignalBlocker blocker(tabWidget->tabBar());
|
||||
|
||||
QString tab = tabs[i];
|
||||
int tb = -1;
|
||||
for (int i=0; i<tabs.count(); i++) {
|
||||
|
||||
for (int j=0; j<tabWidget->tabBar()->count(); j++) {
|
||||
if (tabWidget->tabBar()->tabText(j) == tab) {
|
||||
tb = j;
|
||||
break;
|
||||
QString tab = tabs[i];
|
||||
int tb = -1;
|
||||
|
||||
for (int j=0; j<tabWidget->tabBar()->count(); j++) {
|
||||
if (tabWidget->tabBar()->tabText(j) == tab) {
|
||||
tb = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (tb != -1) {
|
||||
tabWidget->tabBar()->moveTab(tb, i);
|
||||
if (tb != -1) {
|
||||
tabWidget->tabBar()->moveTab(tb, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user