Added swap mash rows.

Tue, 19 Apr 2022 21:26:56 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Tue, 19 Apr 2022 21:26:56 +0200
changeset 146
aad2f9f38fc5
parent 145
fd4f0de86fd9
child 147
af1386a6ece7

Added swap mash rows.

src/EditRecipeTab6.cpp file | annotate | diff | comparison | revisions
--- a/src/EditRecipeTab6.cpp	Tue Apr 19 21:15:42 2022 +0200
+++ b/src/EditRecipeTab6.cpp	Tue Apr 19 21:26:56 2022 +0200
@@ -219,6 +219,15 @@
 
     if (recipe->mashs.size() < 1)
         return;
+
+    this->ignoreChanges = true;
+    Mashs temp;
+    temp = recipe->mashs[row - 1];
+    recipe->mashs[row - 1] = recipe->mashs[row];
+    recipe->mashs[row] = temp;
+    this->ignoreChanges = false;
+    is_changed();
+    emit refreshAll();
 }
 
 
@@ -230,6 +239,15 @@
 
     if (recipe->mashs.size() < 1)
         return;
+
+    this->ignoreChanges = true;
+    Mashs temp;
+    temp = recipe->mashs[row + 1];
+    recipe->mashs[row + 1] = recipe->mashs[row];
+    recipe->mashs[row] = temp;
+    this->ignoreChanges = false;
+    is_changed();
+    emit refreshAll();
 }
 
 

mercurial