Skip to content

Commit

Permalink
Fixes octgn#1359
Browse files Browse the repository at this point in the history
Certain python events that trigger UI updates that run in OnGameStart and OnTableLoad would blow up because the UI hadn't had time to layout before the python would run.
  • Loading branch information
kellyelton committed Jan 18, 2015
1 parent a8a4574 commit 70c9e1f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion octgnFX/Octgn/Play/PlayWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Threading;
using Microsoft.Win32;
using Octgn.Data;
using Octgn.Extentions;
Expand Down Expand Up @@ -185,7 +186,9 @@ public PlayWindow()
table.UpdateSided();
Keyboard.Focus(table);

Program.GameEngine.Ready();
Dispatcher.BeginInvoke(new Action(Program.GameEngine.Ready), DispatcherPriority.ContextIdle);

//Program.GameEngine.Ready();
if (Program.DeveloperMode && Player.LocalPlayer.Spectator == false)
{
MenuConsole.Visibility = Visibility.Visible;
Expand Down

0 comments on commit 70c9e1f

Please sign in to comment.