fixed incorrect red "busy" status light

This commit is contained in:
codeimp 2008-10-01 20:30:29 +00:00
parent 6d6b594c24
commit 0b0f3777ac
3 changed files with 30 additions and 22 deletions

View file

@ -232,6 +232,9 @@ namespace CodeImp.DoomBuilder.Data
texturenames.Sort();
flatnames.Sort();
// Update the used textures
General.Map.Data.UpdateUsedTextures();
// Add texture names to texture sets
foreach(KeyValuePair<long, ImageData> img in textures)
{

View file

@ -332,9 +332,6 @@ namespace CodeImp.DoomBuilder
maplocation = new DataLocation(DataLocation.RESOURCE_WAD, filepathname, false, false);
data.Load(configinfo.Resources, options.Resources, maplocation);
// Update the used textures
General.Map.Data.UpdateUsedTextures();
// Bind any methods
General.Actions.BindMethods(this);
@ -1023,9 +1020,6 @@ namespace CodeImp.DoomBuilder
maplocation = new DataLocation(DataLocation.RESOURCE_WAD, filepathname, false, false);
data.Load(configinfo.Resources, options.Resources, maplocation);
// Update the used textures
General.Map.Data.UpdateUsedTextures();
// Apply new settings to map elements
map.UpdateConfiguration();

View file

@ -411,7 +411,10 @@ namespace CodeImp.DoomBuilder.Windows
// This returns the current status text
internal string GetCurrentSatus()
{
return statuslabel.Text;
if(statustype == StatusType.Busy)
return statuslabel.Text;
else
return null;
}
// This shows a warning
@ -482,21 +485,29 @@ namespace CodeImp.DoomBuilder.Windows
// This changes status text
public void DisplayStatus(string status)
{
// Stop warning timers
warningtimer.Stop();
warningflasher.Stop();
// Null is no busy status
if(status == null)
{
DisplayReady();
}
else
{
// Stop warning timers
warningtimer.Stop();
warningflasher.Stop();
// Update status description
statustype = StatusType.Busy;
if(statuslabel.Text != status)
statuslabel.Text = status;
// Update status description
statustype = StatusType.Busy;
if(statuslabel.Text != status)
statuslabel.Text = status;
// Update icon as well
UpdateStatusIcon();
// Update icon as well
UpdateStatusIcon();
// Refresh if needed
statusbar.Invalidate();
this.Update();
// Refresh if needed
statusbar.Invalidate();
this.Update();
}
}
// This changes status text to Ready