Fixed bug in dockers panel system that allowed the panel to go bonkers when resized smaller than possible.

This commit is contained in:
codeimp 2010-10-03 16:44:34 +00:00
parent 706317a676
commit e6d4bdb607
2 changed files with 18 additions and 9 deletions

View file

@ -408,6 +408,8 @@ namespace CodeImp.DoomBuilder.Controls
int delta = e.X - splitstartoffset;
int collapsedwidth = GetCollapsedWidth();
if(rightalign)
{
if((this.Width > collapsedwidth) || (delta < 0))
{
this.Left += delta;
this.Width -= delta;
@ -417,12 +419,16 @@ namespace CodeImp.DoomBuilder.Controls
this.Width = collapsedwidth;
}
}
}
else
{
if((this.Width > collapsedwidth) || (delta > 0))
{
this.Width += delta;
if(this.Width < collapsedwidth)
this.Width = collapsedwidth;
}
}
General.MainWindow.UnlockUpdate();
this.Update();

View file

@ -2803,7 +2803,10 @@ namespace CodeImp.DoomBuilder.Windows
General.Settings.DockersWidth = dockerspanel.Width;
if(!General.Settings.CollapseDockers)
{
dockersspace.Width = dockerspanel.Width;
dockerspanel.Left = dockersspace.Left;
}
}
#endregion