#169 Layout suspend without resume

v2.3
closed-fixed
nobody
None
5
2010-11-18
2010-02-03
Anonymous
No

I found the following code in DockPane.cs

internal void CloseContent(IDockContent content)
{
DockPanel dockPanel = DockPanel;
dockPanel.SuspendLayout(true);

if (content == null)
return;

if (!content.DockHandler.CloseButton)
return;

if (content.DockHandler.HideOnClose)
content.DockHandler.Hide();
else
content.DockHandler.Close();

dockPanel.ResumeLayout(true, true);
}

If content is null or content.DockHandler.CloseButton == false the dockPanel.ResumeLayout is not invoked, so the layout remains suspended.

Possible resolution is the try...finally block or moving the suspend layout call after the checking mechanism.

Discussion


  • Anonymous
    2010-02-05

    • summary: Layout suspend without resume resume --> Layout suspend without resume
     
  • Steve Overton
    Steve Overton
    2010-11-18

    • status: open --> closed-fixed
     
  • Steve Overton
    Steve Overton
    2010-11-18

    Thanks for pointing this out.

    Currently fixed on the dev 2.5 branch and will be included in the next release.