Skip to content

Commit ca3edc5

Browse files
committed
GUI: Update worker type if task already exist.
So it doesn't invalidly re-use the cached one.
1 parent a1390c3 commit ca3edc5

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/qt/pivx/loadingdialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class Worker : public QObject {
2525
runnable = nullptr;
2626
}
2727
virtual void clean() {};
28+
void setType(int _type) { type = _type; }
2829
public Q_SLOTS:
2930
void process();
3031
Q_SIGNALS:

src/qt/pivx/pwidget.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ bool PWidget::execute(int type, std::unique_ptr<WalletModel::UnlockContext> pctx
108108
WalletWorker* _worker = static_cast<WalletWorker*>(task->worker.data());
109109
_worker->setContext(std::move(pctx));
110110
}
111+
// Update type
112+
task->worker->setType(type);
111113
}
112114
QThreadPool::globalInstance()->start(task.data());
113115
return true;

0 commit comments

Comments
 (0)