mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-17 15:21:30 +02:00
Avoid writing config on tab change
This commit is contained in:
+2
-3
@@ -170,9 +170,6 @@ void MainWindow::initStatusBar() {
|
||||
void MainWindow::initWidgets() {
|
||||
int homeWidget = config()->get(Config::homeWidget).toInt();
|
||||
ui->tabHomeWidget->setCurrentIndex(TabsHome(homeWidget));
|
||||
connect(ui->tabHomeWidget, &QTabWidget::currentChanged, [](int index){
|
||||
config()->set(Config::homeWidget, TabsHome(index));
|
||||
});
|
||||
|
||||
// [History]
|
||||
m_historyWidget = new HistoryWidget(m_ctx, this);
|
||||
@@ -908,6 +905,8 @@ void MainWindow::closeEvent(QCloseEvent *event) {
|
||||
if (!this->cleanedUp) {
|
||||
this->cleanedUp = true;
|
||||
|
||||
config()->set(Config::homeWidget, ui->tabHomeWidget->currentIndex());
|
||||
|
||||
m_historyWidget->resetModel();
|
||||
|
||||
m_updateBytes.stop();
|
||||
|
||||
Reference in New Issue
Block a user