Explorar o código

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

BDisp %!s(int64=4) %!d(string=hai) anos
pai
achega
f32a76b4a9
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  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",