Fix invisible subtag lists in some cases.
[dcpomatic.git] / src / wx / language_tag_dialog.cc
index 0d0203e90a7af71a3c8237a9e5f1504035a08361..1c3ab2f30453a773e3bcd2a1e6ea556bcf1883ac 100644 (file)
@@ -70,6 +70,11 @@ public:
                                SetItemState (item, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
                                EnsureVisible (item);
                        }
+               } else {
+                       if (GetItemCount() > 0) {
+                               /* The new list sometimes isn't visible without this */
+                               EnsureVisible (0);
+                       }
                }
        }