Bug fix - more robust.

This commit is contained in:
Milan Hanajik 2020-01-31 12:40:39 +01:00
parent cf236d94b8
commit ef75c30af9

View File

@ -310,16 +310,19 @@ namespace Results.Forms
oneHeight = Math.Max(MinHeight, flowLayoutPanel.Height / metersInOneGroup - 6);
}
/// Update size of controls
flowLayoutPanel.SuspendLayout();
///
foreach (var oneCtrl in wmRsltsCtrl)
if (wmRsltsCtrl != null)
{
oneCtrl.Width = oneWidth;
oneCtrl.Height = oneHeight;
/// Update size of controls
flowLayoutPanel.SuspendLayout();
///
foreach (var oneCtrl in wmRsltsCtrl)
{
oneCtrl.Width = oneWidth;
oneCtrl.Height = oneHeight;
}
///
flowLayoutPanel.ResumeLayout();
}
///
flowLayoutPanel.ResumeLayout();
}
}
}