mirror of
https://github.com/epasveer/seer.git
synced 2026-08-29 16:40:42 +08:00
Fixed bug with 'readSettings' and 'moveTab'.
This commit is contained in:
@@ -226,26 +226,20 @@ void SeerThreadManagerWidget::readSettings () {
|
||||
//qDebug() << "Current" << current;
|
||||
|
||||
// Move tabs to the requested order.
|
||||
// Ignore signals from the tabbar as these will call 'writeSettings'
|
||||
// while we're in 'readSettings'.
|
||||
{
|
||||
QSignalBlocker blocker(tabWidget->tabBar());
|
||||
for (int i=0; i<tabs.count(); i++) {
|
||||
|
||||
for (int i=0; i<tabs.count(); i++) {
|
||||
QString tab = tabs[i];
|
||||
int tb = -1;
|
||||
|
||||
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;
|
||||
}
|
||||
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