Layout parent sizers.
authorCarl Hetherington <cth@carlh.net>
Sat, 8 Dec 2018 01:14:07 +0000 (01:14 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 8 Dec 2018 01:14:07 +0000 (01:14 +0000)
src/wx/i18n_hook.cc

index bb185526e8c0e99db25f12e73870de35842e0e77..f7bc4829ddf908555781f478602b949880161ed5 100644 (file)
@@ -40,7 +40,15 @@ I18NHook::handle (wxMouseEvent& ev)
        InstantI18NDialog* d = new InstantI18NDialog (_window, get_text());
        d->ShowModal();
        set_text (d->get());
-       _window->GetContainingSizer()->Layout();
+
+       wxWindow* w = _window;
+       while (w) {
+               if (w->GetContainingSizer()) {
+                       w->GetContainingSizer()->Layout();
+               }
+               w = w->GetParent();
+       }
+
        ev.Skip ();
 
        boost::filesystem::path file = "instant_i18n";