Visual mode: fixed a crash while changing 3d floor texture offsets when visual sector was not created for 3d floor's control sector.

Visual mode: Info/Warning/Error status messages were not displayed properly when nothing was selected.
Sector Edit form, UDMF: Reset and Link buttons were overlapped in Floor/Ceiling scale controls.
This commit is contained in:
MaxED 2013-07-29 12:01:06 +00:00
parent ca49587ed1
commit e0b7af81a4
5 changed files with 16 additions and 26 deletions

View file

@ -26,7 +26,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
private bool allowValueLinking;
private bool linkValues;
private bool blockUpdate;
private int bResetPosX;
private int bResetOffsetX;
#endregion
@ -48,7 +48,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
public PairedFieldsControl() {
InitializeComponent();
bResetPosX = bReset.Left;
bResetOffsetX = this.Width - bReset.Left;
}
#endregion
@ -114,7 +114,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Controls
if(!allowValueLinking) {
bReset.Left = bLink.Left;
} else {
bReset.Left = bResetPosX;
bReset.Left = this.Width - bResetOffsetX;
bLink.Image = (linkValues ? Resources.Link : Resources.Unlink);
}
}

View file

@ -604,7 +604,7 @@ namespace CodeImp.DoomBuilder.VisualModes
{
// Make new visualsector
vs = CreateVisualSector(sd.Sector);
if(vs != null) allsectors.Add(sd.Sector, vs);
//if(vs != null) allsectors.Add(sd.Sector, vs); //mxd
}
if(vs != null)
@ -942,7 +942,7 @@ namespace CodeImp.DoomBuilder.VisualModes
/// This returns the VisualSector for the given Sector.
/// </summary>
public VisualSector GetVisualSector(Sector s) {
if(!allsectors.ContainsKey(s)) return null; //mxd
if(!allsectors.ContainsKey(s)) return CreateVisualSector(s); //mxd
return allsectors[s];
}

View file

@ -667,7 +667,7 @@ namespace CodeImp.DoomBuilder.Windows
public void DisplayStatus(StatusInfo newstatus)
{
// Stop timers
if(!newstatus.displayed)
if(newstatus.type != StatusType.Selection && !newstatus.displayed) //mxd
{
statusresetter.Stop();
statusflasher.Stop();
@ -680,16 +680,18 @@ namespace CodeImp.DoomBuilder.Windows
// When no particular information is to be displayed.
// The messages displayed depends on running background processes.
case StatusType.Ready:
if((General.Map != null) && (General.Map.Data != null))
if(General.Map.Data.IsLoading)
newstatus.message = STATUS_LOADING_TEXT;
else
newstatus.message = selectionInfo; //mxd
else
if ((General.Map != null) && (General.Map.Data != null)) {
newstatus.message = General.Map.Data.IsLoading ? STATUS_LOADING_TEXT : selectionInfo;
} else {
newstatus.message = STATUS_READY_TEXT;
}
break;
case StatusType.Selection: //mxd
if (statusresetter.Enabled) { //don't change the message right now if info or warning is displayed
selectionInfo = (string.IsNullOrEmpty(newstatus.message) ? STATUS_NO_SELECTION_TEXT : newstatus.message);
return;
}
if(string.IsNullOrEmpty(newstatus.message))
newstatus.message = STATUS_NO_SELECTION_TEXT;
selectionInfo = newstatus.message;

View file

@ -147,12 +147,6 @@
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label6.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="label5.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="tabproperties.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@ -162,7 +156,4 @@
<metadata name="fieldslist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="fieldslist.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View file

@ -378,6 +378,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
protected override VisualSector CreateVisualSector(Sector s)
{
BaseVisualSector vs = new BaseVisualSector(this, s);
if (vs != null) allsectors.Add(s, vs); //mxd
return vs;
}
@ -501,11 +502,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//mxd
protected override void moveSelectedThings(Vector2D direction, bool absolutePosition) {
List<VisualThing> visualThings = GetSelectedVisualThings(true);
if (visualThings.Count == 0) {
General.Interface.DisplayStatus(StatusType.Warning, "Select some Things first!");
return;
}
if (visualThings.Count == 0) return;
PreAction(UndoGroup.ThingMove);