From 2000377783b81176df245df184f61f9d09fabb6c Mon Sep 17 00:00:00 2001 From: Duke Date: Thu, 28 Dec 2023 16:49:50 -0500 Subject: [PATCH] Too bad this code does not seem to work --- src/mainwindow.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 0b2e69e..b037569 100755 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1290,9 +1290,18 @@ void MainWindow::importPrivKey() { delete multiline; } - //TODO: if rescan is not checked, disable the rescan height input bool rescan = pui.chkrescan->isChecked(); + //TODO: if rescan is not checked, disable the rescan height input + // Why don't these work? + if (rescan) { + //pui.rescanfrom->setEnabled(true); + pui.rescanfrom->setReadOnly(false); + } else { + //pui.rescanfrom->setDisabled(true); + pui.rescanfrom->setReadOnly(true); + } + // Start the import. The function takes ownership of keys QTimer::singleShot(1, [=]() { // we import all keys without rescanning and then finally decide if we will rescan once @@ -1300,7 +1309,7 @@ void MainWindow::importPrivKey() { if (rescan) { rpc->rescan(pui.rescanfrom->text().toInt() , [=] (QJsonValue response){ - qDebug() << __func__ << ":rescanning from height " << pui.rescanfrom << " finished" << response; + qDebug() << __func__ << ":rescanning from height " << pui.rescanfrom->text().toInt() << " finished" << response; ui->statusBar->showMessage(tr("Rescanning finished"), 5000); }); }