diff --git a/app/fwupgrade/mainwindow.cpp b/app/fwupgrade/mainwindow.cpp index e3fac9cf..8b327d64 100644 --- a/app/fwupgrade/mainwindow.cpp +++ b/app/fwupgrade/mainwindow.cpp @@ -438,6 +438,7 @@ void MainWindow::on_comboDevList_currentIndexChanged(int index) ui->label_scanCount->setText(QString(tr("scan count: %1")).arg(QString::number(0))); ui->label_deviceError->clear(); ui->labelDevInfo->clear(); + ui->label_correct->setText(tr("Have not corrected")); if (nullptr != m_curDevHandle) { @@ -920,14 +921,15 @@ void MainWindow::on_pushButton_correct_clicked() { QMessageBox::information(this, tr("Prompt"), tr("do not support")); ui->label_correct->setText(tr("do not support")); + m_isFlatCorrecting = false; return; } else { QMessageBox::information(this, tr("Prompt"), tr("Correct failed")); + m_isFlatCorrecting = false; return; } - } void MainWindow::on_pushButton_exportTestPaper_clicked() @@ -945,6 +947,10 @@ void MainWindow::on_pushButton_countDistortion_clicked() ui->lineEdit_countDistortion->clear(); SANE_Bool type = true; + float distortion = 1.0; unsigned int len = sizeof(SANE_Bool); - SANE_Status ret = sane_io_control(m_curDevHandle, IO_CTRL_CODE_SET_DISTORTION_IMAGE, &type, &len); + + initColorAndDpi(); + SANE_Status ret = sane_io_control(m_curDevHandle, IO_CTRL_CODE_SET_DISTORTION_DEVS_CHECK_VAL, &distortion, &len); + ret = sane_io_control(m_curDevHandle, IO_CTRL_CODE_SET_DISTORTION_IMAGE, &type, &len); }