src/EditRecipeTab2.cpp

changeset 171
6cd2d808d863
parent 168
4bc92122d001
child 229
815ee118ad49
--- a/src/EditRecipeTab2.cpp	Wed Apr 27 13:07:54 2022 +0200
+++ b/src/EditRecipeTab2.cpp	Thu Apr 28 13:08:20 2022 +0200
@@ -483,6 +483,9 @@
 
 void EditRecipe::deleteFermentRow_clicked()
 {
+    if (recipe->locked)
+	return;
+
     QPushButton *pb = qobject_cast<QPushButton *>(QObject::sender());
     int row = pb->objectName().toInt();
     qDebug() << "Delete fermentable row" << row << recipe->fermentables.size();
@@ -781,6 +784,9 @@
 {
     QSqlQuery query;
 
+    if (recipe->locked)
+	return;
+
     QPushButton *pb = qobject_cast<QPushButton *>(QObject::sender());
     recipe->fermentables_row = pb->objectName().toInt();
     qDebug() << "Edit fermentable row" << recipe->fermentables_row;

mercurial