ComboBox in dialog. Only switch off autoHide if its the only control in the dialog

This commit is contained in:
Ross Ferguson
2020-07-22 07:33:17 +01:00
parent 5b38613d59
commit ca6eef2d89

View File

@@ -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 && view.Subviews.Count == 1 && view.Subviews [0].Subviews.Count == 1) {
autoHide = false;
break;
}