mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-20 10:53:19 +00:00
Fixed bug in dockers panel system that allowed the panel to go bonkers when resized smaller than possible.
This commit is contained in:
parent
706317a676
commit
e6d4bdb607
2 changed files with 18 additions and 9 deletions
|
@ -409,19 +409,25 @@ namespace CodeImp.DoomBuilder.Controls
|
|||
int collapsedwidth = GetCollapsedWidth();
|
||||
if(rightalign)
|
||||
{
|
||||
this.Left += delta;
|
||||
this.Width -= delta;
|
||||
if(this.Width < collapsedwidth)
|
||||
if((this.Width > collapsedwidth) || (delta < 0))
|
||||
{
|
||||
this.Left -= collapsedwidth - this.Width;
|
||||
this.Width = collapsedwidth;
|
||||
this.Left += delta;
|
||||
this.Width -= delta;
|
||||
if(this.Width < collapsedwidth)
|
||||
{
|
||||
this.Left -= collapsedwidth - this.Width;
|
||||
this.Width = collapsedwidth;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Width += delta;
|
||||
if(this.Width < collapsedwidth)
|
||||
this.Width = collapsedwidth;
|
||||
if((this.Width > collapsedwidth) || (delta > 0))
|
||||
{
|
||||
this.Width += delta;
|
||||
if(this.Width < collapsedwidth)
|
||||
this.Width = collapsedwidth;
|
||||
}
|
||||
}
|
||||
|
||||
General.MainWindow.UnlockUpdate();
|
||||
|
|
|
@ -2801,9 +2801,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
private void dockerspanel_UserResize(object sender, EventArgs e)
|
||||
{
|
||||
General.Settings.DockersWidth = dockerspanel.Width;
|
||||
|
||||
|
||||
if(!General.Settings.CollapseDockers)
|
||||
{
|
||||
dockersspace.Width = dockerspanel.Width;
|
||||
dockerspanel.Left = dockersspace.Left;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in a new issue