Ver Fonte

Merge pull request #817 from fergusonr/combobox_in_dialog

Fixes #816. ComboBox in dialog. Only switch off autoHide if its the only control in the dialog
Charlie Kindel há 5 anos atrás
pai
commit
a3edf4e831
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      Terminal.Gui/Views/ComboBox.cs

+ 2 - 2
Terminal.Gui/Views/ComboBox.cs

@@ -142,9 +142,9 @@ namespace Terminal.Gui {
 
 			Added += (View v) => {
 
-				// Determine if this view is hosted inside a dialog
+				// Determine if this view is hosted inside a dialog and is the only control
 				for (View view = this.SuperView; view != null; view = view.SuperView) {
-					if (view is Dialog) {
+					if (view is Dialog && SuperView != null && SuperView.Subviews.Count == 1 && SuperView.Subviews[0] == this) {
 						autoHide = false;
 						break;
 					}