From f0beedd3047b20898e39e8bd800f4b280f9b35aa Mon Sep 17 00:00:00 2001 From: Duke Date: Mon, 6 Feb 2023 00:02:21 -0500 Subject: [PATCH] Instantly update the mining GUI when number of threads changes --- src/mainwindow.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 20cb5bd..973cf57 100755 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1586,6 +1586,11 @@ void MainWindow::setupMiningTab() { DEBUG("changing number of threads to " << threads); rpc->setGenerate(threads, [=] (QJsonValue response){ DEBUG("setgenerate response=" << response); + + // instantly update miningthreads GUI + auto miningthreads = ui->tabWidget->findChild("miningthreads"); + miningthreads->display(QString::number(threads)); // miningthreads + DEBUG("updated mining thread count to " << QString(threads) ); }); }); @@ -1604,8 +1609,10 @@ void MainWindow::setupMiningTab() { DEBUG("setgenerate response=" << response); // these values will auto-update in a few seconds but do it // immediately so as to not confuse the user - // TODO: coredumps - // lcd5->display(QString(threads)); // miningthreads + auto miningthreads = ui->tabWidget->findChild("miningthreads"); + // miningthreads->display(QString(threads)); // miningthreads + miningthreads->display(QString::number(threads)); // miningthreads + DEBUG("updated mining thread count to " << QString(threads) ); }); });