Brewmaster.Layout.LayoutHandler.AddPanelToGroupedPanel C# (CSharp) Method

AddPanelToGroupedPanel() private method

private AddPanelToGroupedPanel ( Brewmaster.Layout.IdePanel sibling, Brewmaster.Layout.IdePanel idePanel, int index ) : void
sibling Brewmaster.Layout.IdePanel
idePanel Brewmaster.Layout.IdePanel
index int
return void
		private void AddPanelToGroupedPanel(IdePanel sibling, IdePanel idePanel, int index)
		{
			// TODO: Method for identifying specific parent controls
			var parent = sibling.Parent;
			while (parent != null)
			{
				if (parent is IdeGroupedPanel groupedPanel)
				{
					groupedPanel.AddPanel(idePanel, true, index);
					return;
				}
				parent = parent.Parent;
			}
			// Sibling isn't in a groupedpanel anymore, so join panels in a new one
			JoinPanels(sibling, idePanel, index);
		}