diff -r 50b057ae50aa -r 7c9fb24bcc07 src/EditProductTab2.cpp --- a/src/EditProductTab2.cpp Sat Jun 08 16:58:52 2024 +0200 +++ b/src/EditProductTab2.cpp Sun Jun 09 11:47:41 2024 +0200 @@ -60,6 +60,22 @@ { QSqlQuery query; + /* + * First see if we need to upgrade HLT settings. + * Test for default settings, change if possible. + */ + if (product->eq_HLT_volume == 20 && product->eq_HLT_deadspace == 2) { + query.prepare("SELECT name,HLT_volume,HLT_deadspace FROM inventory_equipments WHERE name=:name"); + query.bindValue(":name", product->eq_name); + query.exec(); + if (query.next()) { + product->eq_HLT_volume = query.value("HLT_volume").toDouble(); + product->eq_HLT_deadspace = query.value("HLT_deadspace").toDouble(); + qDebug() << " Update equipment HLT settings" << product->eq_HLT_volume << product->eq_HLT_deadspace; + is_changed(); + } + } + ui->eq_selectEdit->addItem(""); query.prepare("SELECT name FROM inventory_equipments ORDER BY name"); query.exec();