Only load command bars if they're specified in the config

This commit is contained in:
Michael Becker 2014-06-26 18:42:46 -04:00
parent 5d3e79c04b
commit 43c8fa632f

View File

@ -398,14 +398,17 @@ namespace UniversalEditor.UserInterface
UpdateSplashScreenStatus("Loading command bars");
MarkupTagElement tagCommandBars = (mvarRawMarkup.FindElement("UniversalEditor", "Application", "CommandBars") as MarkupTagElement);
foreach (MarkupElement elCommandBar in tagCommandBars.Elements)
if (tagCommandBars != null)
{
MarkupTagElement tagCommandBar = (elCommandBar as MarkupTagElement);
if (tagCommandBar == null) continue;
if (tagCommandBar.FullName != "CommandBar") continue;
InitializeCommandBar(tagCommandBar);
foreach (MarkupElement elCommandBar in tagCommandBars.Elements)
{
MarkupTagElement tagCommandBar = (elCommandBar as MarkupTagElement);
if (tagCommandBar == null) continue;
if (tagCommandBar.FullName != "CommandBar") continue;
InitializeCommandBar(tagCommandBar);
}
}
UpdateSplashScreenStatus("Loading languages and translations");
MarkupTagElement tagLanguages = (mvarRawMarkup.FindElement("UniversalEditor", "Application", "Languages") as MarkupTagElement);