diff -r fd568cc1dd0e -r b5b2483f3a3f src/EditRecipeTab3.cpp --- a/src/EditRecipeTab3.cpp Wed Apr 20 22:48:20 2022 +0200 +++ b/src/EditRecipeTab3.cpp Thu Apr 21 17:22:01 2022 +0200 @@ -45,12 +45,6 @@ qDebug() << "refreshHops" << recipe->hops.size(); std::sort(recipe->hops.begin(), recipe->hops.end(), hop_sort_test); - /* - * During filling the table turn off the cellChanged signal because every cell that is filled - * triggers the cellChanged signal. The QTableWidget has no better signal to use. - */ - this->ignoreChanges = true; - const QStringList labels({tr("Origin"), tr("Hop"), tr("Type"), tr("Form"), tr("Alpha"), tr("Use at"), tr("Time"), tr("IBU"), tr("Amount"), tr("Delete"), tr("Edit") }); @@ -138,7 +132,6 @@ pWidget->setLayout(pLayout); ui->hopsTable->setCellWidget(i, 10, pWidget); } - this->ignoreChanges = false; } @@ -207,6 +200,7 @@ recipe->est_ibu = ibus; ui->est_ibuEdit->setValue(recipe->est_ibu); ui->est_ibu2Edit->setValue(recipe->est_ibu); + ui->est_ibuShow->setValue(recipe->est_ibu); ui->hop_tasteShow->setValue(hop_flavour); ui->hop_aromaShow->setValue(hop_aroma); } @@ -259,9 +253,7 @@ if (rc == QMessageBox::No) return; - this->ignoreChanges = true; recipe->hops.removeAt(row); - this->ignoreChanges = false; is_changed(); emit refreshAll(); } @@ -272,7 +264,6 @@ QTableWidgetItem *item; qDebug() << "hop_amount_changed()" << recipe->hops_row << val; - this->ignoreChanges = true; recipe->hops[recipe->hops_row].h_amount = val / 1000.0; item = new QTableWidgetItem(QString("%1 gr").arg(val, 2, 'f', 1, '0')); @@ -288,7 +279,6 @@ item->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter); ui->hopsTable->setItem(recipe->hops_row, 7, item); - this->ignoreChanges = false; calcIBUs(); is_changed(); } @@ -300,9 +290,7 @@ qDebug() << "hop_time_changed()" << recipe->hops_row << val; - this->ignoreChanges = true; recipe->hops[recipe->hops_row].h_time = val; - if (recipe->hops.at(recipe->hops_row).h_useat == 2 || recipe->hops.at(recipe->hops_row).h_useat == 4) { // Boil or whirlpool item = new QTableWidgetItem(QString("%1 min.").arg(val, 1, 'f', 0, '0')); } else if (recipe->hops.at(recipe->hops_row).h_useat == 5) { // Dry-hop @@ -322,7 +310,6 @@ item->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter); ui->hopsTable->setItem(recipe->hops_row, 7, item); - this->ignoreChanges = false; calcIBUs(); is_changed(); }