[longomatch] Update cameras config for fake live projects



commit 1d73cd68433174b3ee558afb82a981c56ce91f53
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Wed Apr 1 21:24:23 2015 +0200

    Update cameras config for fake live projects
    
    While tagging events are created with a single camera but
    the user can add more cameras aftwerwards. We need to make sure
    the config is valid with the new file set

 LongoMatch.GUI/Gui/Component/ProjectPeriods.cs |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs b/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
index 321f500..6343aa7 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
@@ -165,6 +165,16 @@ namespace LongoMatch.Gui.Component
 
                public void SaveChanges (bool resyncEvents)
                {
+                       foreach (TimelineEvent evt in project.Timeline) {
+                               int cc = evt.CamerasVisible.Count;
+                               int fc = project.Description.FileSet.Count;
+
+                               if (cc < fc) {
+                                       for (int i = cc; i < fc; i++) {
+                                               evt.CamerasVisible.Add (i);
+                                       }
+                               }
+                       }
 
                        if (!resyncEvents)
                                return;


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