public override void ToggleAll(bool active)
        {
            TreeIter current;

            store.GetIterFirst(out current);
            filter.IgnoreUpdates = true;
            ToggleAll(current, active, false);
            filter.IgnoreUpdates = false;
            filter.Update();
        }
Beispiel #2
0
 void DeletePlays(List <TimelineEvent> plays, bool update = true)
 {
     Log.Debug(plays.Count + " plays deleted");
     analysisWindow.DeletePlays(plays);
     openedProject.RemoveEvents(plays);
     if (projectType == ProjectType.FileProject)
     {
         Save(openedProject);
     }
     if (loadedPlay != null && plays.Contains(loadedPlay))
     {
         Config.EventsBroker.EmitLoadEvent(null);
     }
     filter.Update();
 }
Beispiel #3
0
 void HandlePlayChanged(TimeNode tNode, Time time)
 {
     if (tNode is TimelineEvent)
     {
         LoadPlay(tNode as TimelineEvent, time, false);
         filter.Update();
     }
 }
Beispiel #4
0
        protected override void UpdateSelection(TreeIter iter, bool active)
        {
            TreeStore store  = Model as TreeStore;
            LMPlayer  player = (LMPlayer)store.GetValue(iter, COL_VALUE);

            /* Check all children */
            if (player == localTeam || player == visitorTeam)
            {
                TreeIter child;
                store.IterChildren(out child, iter);

                filter.IgnoreUpdates = true;
                while (store.IterIsValid(child))
                {
                    LMPlayer childPlayer = (LMPlayer)store.GetValue(child, COL_VALUE);
                    filter.FilterPlayer(childPlayer, active);
                    store.SetValue(child, COL_ACTIVE, active);
                    store.IterNext(ref child);
                }
                filter.IgnoreUpdates = false;
            }
            else
            {
                filter.FilterPlayer(player, active);
                if (!active)
                {
                    TreeIter team;
                    /* Uncheck the team check button */
                    if (local.List.Contains(player))
                    {
                        team = localIter;
                    }
                    else
                    {
                        team = visitorIter;
                    }
                    store.SetValue(team, COL_ACTIVE, false);
                }
            }

            store.SetValue(iter, COL_ACTIVE, active);
            filter.Update();
        }