Move DataStore.Initialize before db dependent GetStartupBounds call

- Issue MatterHackers/MCCentral#2538
Can't run with no MatterControl directory (new install)
This commit is contained in:
John Lewin 2018-01-01 19:52:49 -08:00
parent bffe4fdaaf
commit 13a0bbaa73
3 changed files with 3 additions and 4 deletions

View file

@ -3,6 +3,7 @@ using System.Globalization;
using System.IO;
using System.Threading;
using MatterHackers.Agg.Platform;
using MatterHackers.MatterControl.DataStorage;
using MatterHackers.MatterControl.SettingsManagement;
using Mindscape.Raygun4Net;
@ -31,6 +32,7 @@ namespace MatterHackers.MatterControl
// Make sure we have the right working directory as we assume everything relative to the executable.
Directory.SetCurrentDirectory(Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location));
Datastore.Instance.Initialize();
#if !DEBUG
// Conditionally spin up error reporting if not on the Stable channel