mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-26 22:01:45 +00:00
Fixed, Script Editor: fixed a crash triggered by creating a new tab, then closing script editor.
Fixed, Sectors mode: tags and effect labels were displayed instead of selection number labels after disabling, then enabling selection numbers when there were sectors with tags or effects selected.
This commit is contained in:
parent
4b45b4fd5e
commit
5a8c6342ea
4 changed files with 27 additions and 2 deletions
|
@ -466,9 +466,15 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
foreach(ScriptDocumentTab t in tabs.TabPages) //mxd
|
||||
{
|
||||
if(t.ExplicitSave)
|
||||
General.Map.Options.ScriptFileSettings.Add(t.Filename, t.GetViewSettings());
|
||||
{
|
||||
// Don't store tabs, which were never saved (this only happens when a new tab was created and no text was entered into it before closing the script editor)
|
||||
if(!t.IsSaveAsRequired)
|
||||
General.Map.Options.ScriptFileSettings[t.Filename] = t.GetViewSettings();
|
||||
}
|
||||
else
|
||||
General.Map.Options.ScriptLumpSettings.Add(t.Filename, t.GetViewSettings());
|
||||
{
|
||||
General.Map.Options.ScriptLumpSettings[t.Filename] = t.GetViewSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -269,6 +269,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
General.Map.Map.EndAddRemove(); //mxd
|
||||
}
|
||||
|
||||
public virtual void OnViewSelectionNumbersChanged(bool enabled) { } //mxd
|
||||
public virtual void OnViewSelectionEffectsChanged(bool enabled) { } //mxd
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -1394,6 +1394,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
base.OnRedoEnd(); //mxd
|
||||
}
|
||||
|
||||
//mxd
|
||||
public override void OnViewSelectionNumbersChanged(bool enabled)
|
||||
{
|
||||
if(enabled) UpdateSelectedLabels();
|
||||
}
|
||||
|
||||
//mxd
|
||||
public override void ToggleHighlight()
|
||||
{
|
||||
|
|
|
@ -223,6 +223,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
private void buttonselectionnumbers_Click(object sender, EventArgs e)
|
||||
{
|
||||
BuilderPlug.Me.ViewSelectionNumbers = buttonselectionnumbers.Checked;
|
||||
|
||||
//mxd. Notify current mode
|
||||
BaseClassicMode mode = General.Editing.Mode as BaseClassicMode;
|
||||
if(mode != null) mode.OnViewSelectionNumbersChanged(BuilderPlug.Me.ViewSelectionNumbers);
|
||||
|
||||
General.Interface.RedrawDisplay();
|
||||
General.Interface.DisplayStatus(StatusType.Info, (buttonselectionnumbers.Checked ?
|
||||
"Show selection numbers" :
|
||||
|
@ -233,6 +238,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
private void buttonselectioneffects_Click(object sender, EventArgs e)
|
||||
{
|
||||
BuilderPlug.Me.ViewSelectionEffects = buttonselectioneffects.Checked;
|
||||
|
||||
// Notify current mode
|
||||
BaseClassicMode mode = General.Editing.Mode as BaseClassicMode;
|
||||
if(mode != null) mode.OnViewSelectionEffectsChanged(BuilderPlug.Me.ViewSelectionEffects);
|
||||
|
||||
General.Interface.RedrawDisplay();
|
||||
General.Interface.DisplayStatus(StatusType.Info, (buttonselectioneffects.Checked ?
|
||||
"Show sector tags and effects" :
|
||||
|
|
Loading…
Reference in a new issue