[chronojump] guiTests will stop (not crash) if session has no persons



commit 5515b1eaf964175567aa5ae2de7603b753a05c0f
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Jan 10 23:07:01 2017 +0100

    guiTests will stop (not crash) if session has no persons

 src/gui/guiTests.cs |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gui/guiTests.cs b/src/gui/guiTests.cs
index eb0a377..3133c14 100644
--- a/src/gui/guiTests.cs
+++ b/src/gui/guiTests.cs
@@ -490,6 +490,13 @@ public partial class ChronoJumpWindow
        {
                LogB.TestStart("chronojumpWindowTestsContactsExecuteTest");
 
+               if(myTreeViewPersons.CountRows() == 0)
+               {
+                       new DialogMessage(Constants.MessageTypes.WARNING, "This session has no persons. Test 
will end now!");
+                       testsActive = false;
+                       return false;
+               }
+
                on_button_execute_test_clicked (new object (), new EventArgs ());
 
                testsSuccededCount ++;


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