Bläddra i källkod

Bring patch from Charlie Kindle without the newline changes #381 from https://github.com/migueldeicaza/gui.cs/pull/381/files (#391)

From @tig - Fixed #380 -F9 should close menu as well as open it #381
Miguel de Icaza 5 år sedan
förälder
incheckning
f44e4a86dc
1 ändrade filer med 4 tillägg och 1 borttagningar
  1. 4 1
      Terminal.Gui/Views/Menu.cs

+ 4 - 1
Terminal.Gui/Views/Menu.cs

@@ -919,7 +919,10 @@ namespace Terminal.Gui {
 		public override bool ProcessHotKey (KeyEvent kb)
 		{
 			if (kb.Key == Key.F9) {
-				StartMenu ();
+				if (isMenuClosed)
+					StartMenu ();
+				else
+					CloseAllMenus ();
 				return true;
 			}