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:
parent
bffe4fdaaf
commit
13a0bbaa73
3 changed files with 3 additions and 4 deletions
|
|
@ -1553,9 +1553,6 @@ namespace MatterHackers.MatterControl
|
|||
//UiThread.RunOnIdle(() =>
|
||||
Task.Run(async () =>
|
||||
{
|
||||
ReportStartupProgress(0.1, "Datastore");
|
||||
Datastore.Instance.Initialize();
|
||||
|
||||
ReportStartupProgress(0.15, "MatterControlApplication.Initialize");
|
||||
var mainView = await Initialize(systemWindow, (progress0To1, status) =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -809,7 +809,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
}
|
||||
else
|
||||
{
|
||||
var menuItem = popupMenu.CreateMenuItem((string)menuAction.Title);
|
||||
var menuItem = popupMenu.CreateMenuItem(menuAction.Title);
|
||||
menuItem.Name = $"{menuAction.Title} Menu Item";
|
||||
|
||||
menuItem.Enabled = menuAction.Action != null;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue