[longomatch] Don't enable the game units timeline if the template don't use it
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Don't enable the game units timeline if the template don't use it
- Date: Sun, 18 Dec 2011 21:43:46 +0000 (UTC)
commit baf02b5ee72d10bd5bfa32e5de10e8bb43fc09dd
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Wed Dec 14 22:36:56 2011 +0100
Don't enable the game units timeline if the template don't use it
LongoMatch.GUI/Gui/MainWindow.cs | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/MainWindow.cs b/LongoMatch.GUI/Gui/MainWindow.cs
index e054424..ca0108e 100644
--- a/LongoMatch.GUI/Gui/MainWindow.cs
+++ b/LongoMatch.GUI/Gui/MainWindow.cs
@@ -91,6 +91,7 @@ namespace LongoMatch.Gui
private ProjectType projectType;
private TimeNode selectedTimeNode;
TimeLineWidget timeline;
+ bool gameUnitsActionVisible;
GameUnitsTimelineWidget guTimeline;
#region Constructors
@@ -181,6 +182,8 @@ namespace LongoMatch.Gui
}
public void UpdateGameUnits (GameUnitsList gameUnits) {
+ gameUnitsActionVisible = gameUnits != null && gameUnits.Count > 0;
+ GameUnitsViewAction.Sensitive = gameUnitsActionVisible;
if (gameUnits == null) {
gameunitstaggerwidget1.Visible = false;
return;
@@ -347,7 +350,7 @@ namespace LongoMatch.Gui
SaveProjectAction.Sensitive = sensitive;
TaggingViewAction.Sensitive = sensitive2;
ManualTaggingViewAction.Sensitive = sensitive2;
- GameUnitsViewAction.Sensitive = sensitive2;
+ GameUnitsViewAction.Sensitive = sensitive2 && gameUnitsActionVisible;
TimelineViewAction.Sensitive = sensitive2;
ExportProjectToCSVFileAction.Sensitive = sensitive2;
HideAllWidgetsAction.Sensitive=sensitive2;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]