[chronojump] edit reaction time updates it correctly



commit 02bf3fd49def6e22b2f84fe275967e4cf6739baf
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Jun 23 07:09:03 2016 +0200

    edit reaction time updates it correctly

 src/gui/reactionTime.cs |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/reactionTime.cs b/src/gui/reactionTime.cs
index 9a38f0e..221049c 100644
--- a/src/gui/reactionTime.cs
+++ b/src/gui/reactionTime.cs
@@ -344,6 +344,7 @@ public class EditReactionTimeWindow : EditEventWindow
                        EditReactionTimeWindowBox = new EditReactionTimeWindow (parent);
                }
 
+               EditReactionTimeWindowBox.type = myEvent.Type;
                EditReactionTimeWindowBox.pDN = pDN;
                
                EditReactionTimeWindowBox.initializeValues();
@@ -376,7 +377,7 @@ public class EditReactionTimeWindow : EditEventWindow
        }
 
        protected override string [] findTypes(Event myEvent) {
-               //reaction time has no types
+               //reaction time has types but they can't be changed
                string [] myTypes = new String[0];
                return myTypes;
        }
@@ -392,7 +393,7 @@ public class EditReactionTimeWindow : EditEventWindow
        }
        
        protected override void updateEvent(int eventID, int personID, string description) {
-               SqliteReactionTime.Update(eventID, "", entryTime, personID, description); //2nd is type
+               SqliteReactionTime.Update(eventID, type, entryTime, personID, description);
        }
 
        protected override void on_button_cancel_clicked (object o, EventArgs args)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]