[longomatch] Minor comments and safety checks.
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Minor comments and safety checks.
- Date: Wed, 18 Mar 2015 14:43:08 +0000 (UTC)
commit 1412477c34f2b1b8304b6b1c12fb0042e3f62ecb
Author: Julien Moutte <julien fluendo com>
Date: Sat Mar 14 09:42:42 2015 +0100
Minor comments and safety checks.
LongoMatch.GUI/Gui/Component/ProjectPeriods.cs | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs b/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
index bcccfe6..44a8858 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectPeriods.cs
@@ -140,8 +140,12 @@ namespace LongoMatch.Gui.Component
public void Pause ()
{
- main_cam_playerbin.Pause ();
- sec_cam_playerbin.Pause ();
+ if (main_cam_playerbin.Opened) {
+ main_cam_playerbin.Pause ();
+ }
+ if (sec_cam_playerbin.Opened) {
+ sec_cam_playerbin.Pause ();
+ }
}
public void Seek (Time time, bool accurate)
@@ -183,10 +187,12 @@ namespace LongoMatch.Gui.Component
gamePeriods = value.Dashboard.GamePeriods;
MediaFileSet fileSet = project.Description.FileSet;
- file = fileSet.FirstOrDefault ();
start = new Time (0);
+ // FIXME: What should we do if the fileset is empty ?
+ file = fileSet.FirstOrDefault ();
duration = file.Duration;
pDuration = new Time (duration.MSeconds / gamePeriods.Count);
+ // If no periods are provided create from dashboard
if (project.Periods == null || project.Periods.Count == 0) {
periods = new List<Period> ();
gamePeriods = value.Dashboard.GamePeriods;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]