Fixed some recurion problem with 'readSettings' calling 'writeSettings'.

This commit is contained in:
Ernie Pasveer
2026-03-17 14:06:31 -05:00
parent 485858c9ba
commit ae1f701cb9
5 changed files with 80 additions and 50 deletions
+16 -10
View File
@@ -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);
}
}
}