Fix invisible subtag lists in some cases.
authorCarl Hetherington <cth@carlh.net>
Sun, 15 Nov 2020 22:15:57 +0000 (23:15 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 15 Nov 2020 22:15:57 +0000 (23:15 +0100)
On Debian 10 / GTK3 (at least) sometimes when you add a new subtag
the searchable list isn't displayed until you scroll it a little.

This hack seems to fix that.

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);
+                       }
                }
        }