mirror of
https://github.com/colhountech/DarkUI.Net5.git
synced 2025-07-02 23:29:28 +03:00
Fixed removing content from tabbed group
DarkDockGroup now recognises when the active VisibleContent is removed and properly brings forward the first remaining dock content and makes it visible.
This commit is contained in:
parent
0881540b10
commit
d8308f6f03
@ -71,9 +71,14 @@ namespace DarkUI.Docking
|
||||
_tabs.Add(dockContent, new DarkDockTab(dockContent));
|
||||
|
||||
if (VisibleContent == null)
|
||||
{
|
||||
dockContent.Visible = true;
|
||||
VisibleContent = dockContent;
|
||||
}
|
||||
else
|
||||
{
|
||||
dockContent.Visible = false;
|
||||
}
|
||||
|
||||
var menuItem = new ToolStripMenuItem(dockContent.DockText);
|
||||
menuItem.Tag = dockContent;
|
||||
@ -98,9 +103,12 @@ namespace DarkUI.Docking
|
||||
{
|
||||
VisibleContent = null;
|
||||
|
||||
// todo: order?
|
||||
foreach (var content in _contents)
|
||||
VisibleContent = content;
|
||||
if (_contents.Count > 0)
|
||||
{
|
||||
var newContent = _contents[0];
|
||||
newContent.Visible = true;
|
||||
VisibleContent = newContent;
|
||||
}
|
||||
}
|
||||
|
||||
ToolStripMenuItem itemToRemove = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user