소스 검색

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

BDisp 4 년 전
부모
커밋
f32a76b4a9
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  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",