From fb79b8994fef4b17996598d2592cb6c2ccca40c6 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 29 May 2024 19:02:55 -0400 Subject: [PATCH] Appearance: Only Select() if we are attached to a window. Otherwise the appropriate message won't be sent. AttachedToWindow() will take care of selecting in that case. Fixes #18891. --- src/preferences/appearance/APRView.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/preferences/appearance/APRView.cpp b/src/preferences/appearance/APRView.cpp index df9f7a7d89..9a2802f234 100644 --- a/src/preferences/appearance/APRView.cpp +++ b/src/preferences/appearance/APRView.cpp @@ -253,7 +253,8 @@ APRView::_CreateItems() fAttrList->AddItem(new ColorWhichItem(text, which, ui_color(which))); } - fAttrList->Select(0); + if (Window() != NULL) + fAttrList->Select(0); }