Changing properties only works if the compiler ui is ready

This commit is contained in:
erri120 2019-10-07 15:48:40 +02:00
parent b85d27bb38
commit 6fd4283171
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135
2 changed files with 23 additions and 18 deletions

View File

@ -177,12 +177,14 @@ namespace Wabbajack
internal ModlistPropertiesWindow modlistPropertiesWindow;
private void OpenModListProperties()
{
if(modlistPropertiesWindow == null)
{
modlistPropertiesWindow = new ModlistPropertiesWindow(this);
if (UIReady) {
if (modlistPropertiesWindow == null)
{
modlistPropertiesWindow = new ModlistPropertiesWindow(this);
}
modlistPropertiesWindow.Show();
}
modlistPropertiesWindow.Show();
}
public string _nexusSiteURL = null;

View File

@ -49,21 +49,24 @@ namespace Wabbajack
private void SaveProperties_Click(object sender, RoutedEventArgs e)
{
BitmapImage splashScreen = null;
if (newBannerFile != null)
if (state.UIReady)
{
splashScreen = new BitmapImage(new Uri(newBannerFile));
BitmapImage splashScreen = null;
if (newBannerFile != null)
{
splashScreen = new BitmapImage(new Uri(newBannerFile));
}
string modListName = ModlistNameProperty.Text;
string modListAuthor = ModlistAuthorProperty.Text;
string modListDescription = ModlistDescriptionProperty.Text;
state.SplashScreenImage = splashScreen;
state.SplashScreenModName = modListName;
state.SplashScreenSummary = modListDescription;
state.SplashScreenAuthorName = modListAuthor;
Hide();
}
string modListName = ModlistNameProperty.Text;
string modListAuthor = ModlistAuthorProperty.Text;
string modListDescription = ModlistDescriptionProperty.Text;
state.SplashScreenImage = splashScreen;
state.SplashScreenModName = modListName;
state.SplashScreenSummary = modListDescription;
state.SplashScreenAuthorName = modListAuthor;
Hide();
}
}
}