Browse Source

Fixes the View Menu to set current child if is visible.

BDisp 4 years ago
parent
commit
f32a76b4a9
1 changed files with 5 additions and 1 deletions
  1. 5 1
      UICatalog/Scenarios/BackgroundWorkerCollection.cs

+ 5 - 1
UICatalog/Scenarios/BackgroundWorkerCollection.cs

@@ -113,7 +113,11 @@ namespace UICatalog {
 				item.Action += () => {
 					var top = Application.MdiChildes.Find ((x) => x.Data.ToString () == "WorkerApp");
 					item.Checked = top.Visible = !item.Checked;
-					Application.MdiTop.SetNeedsDisplay ();
+					if (top.Visible) {
+						top.ShowChild ();
+					} else {
+						Application.MdiTop.SetNeedsDisplay ();
+					}
 				};
 				menuItems.Add (item);
 				return new MenuBarItem ("_View",