mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-27 06:02:11 +00:00
Fixed, Texture Browser form: we should not save "Long texture names" value when Map.Config.UseLongTextureNames is disabled.
Fixed, Linedef Edit form (UDMF): fixed a crash on opening the form when "linedefrenderstyles" block was missing from game configuration.
This commit is contained in:
parent
0ab9f07087
commit
1e421bda7e
2 changed files with 5 additions and 11 deletions
|
@ -237,16 +237,10 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
frontUdmfControls = new List<PairedFieldsControl> { pfcFrontOffsetTop, pfcFrontOffsetMid, pfcFrontOffsetBottom, pfcFrontScaleTop, pfcFrontScaleMid, pfcFrontScaleBottom };
|
||||
backUdmfControls = new List<PairedFieldsControl> { pfcBackOffsetTop, pfcBackOffsetMid, pfcBackOffsetBottom, pfcBackScaleTop, pfcBackScaleMid, pfcBackScaleBottom };
|
||||
|
||||
// Store renderstyle keys?
|
||||
if(General.Map.Config.LinedefRenderStyles.Count > 0)
|
||||
{
|
||||
renderstyles = new string[General.Map.Config.LinedefRenderStyles.Count];
|
||||
General.Map.Config.LinedefRenderStyles.Keys.CopyTo(renderstyles, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderStyle.Enabled = false;
|
||||
}
|
||||
// Setup renderstyles
|
||||
renderstyles = new string[General.Map.Config.LinedefRenderStyles.Count];
|
||||
General.Map.Config.LinedefRenderStyles.Keys.CopyTo(renderstyles, 0);
|
||||
renderStyle.Enabled = (General.Map.Config.LinedefRenderStyles.Count > 0);
|
||||
|
||||
// Fill renderstyles
|
||||
foreach(KeyValuePair<string, string> lf in General.Map.Config.LinedefRenderStyles)
|
||||
|
|
|
@ -447,7 +447,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
|
||||
//mxd. Save ImageBrowserControl settings
|
||||
General.Settings.WriteSetting("browserwindow.showtexturesizes", ImageBrowserControl.ShowTextureSizes);
|
||||
General.Settings.WriteSetting("browserwindow.uselongtexturenames", ImageBrowserControl.UseLongTextureNames);
|
||||
if(General.Map.Config.UseLongTextureNames) General.Settings.WriteSetting("browserwindow.uselongtexturenames", ImageBrowserControl.UseLongTextureNames);
|
||||
|
||||
// Clean up
|
||||
browser.CleanUp();
|
||||
|
|
Loading…
Reference in a new issue