Explorar o código

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