Fix Bug in Dotnet Bar related to multiple events and closing display tabs
This commit is contained in:
@@ -886,9 +886,18 @@ namespace Volian.Controls.Library
|
|||||||
if (myTabItem.ContainerControl == null) return;
|
if (myTabItem.ContainerControl == null) return;
|
||||||
Bar b = myTabItem.ContainerControl as Bar;
|
Bar b = myTabItem.ContainerControl as Bar;
|
||||||
if (b != null)
|
if (b != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
b.CloseDockTab(myTabItem);
|
b.CloseDockTab(myTabItem);
|
||||||
//b.Items.Remove(myTabItem);
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
//This is to work around a bug inside 3rd party DotNetBar
|
||||||
|
//The bug occurs when events happen out of order and it tries
|
||||||
|
//to remove a TabItem from the Collection the has already been removed
|
||||||
|
}
|
||||||
|
|
||||||
RemoveItem(myTabItem);
|
RemoveItem(myTabItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user