From 8c58c0c5e3f8c02321d297a3374c9fcf3b43c579 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 29 Mar 2023 18:35:04 -0400 Subject: [PATCH] BaseTranslator: Use PreferredSize() not ExplicitPreferredSize() in resize. The former will use the explicit preferred size if one is set; otherwise, it will use the computed preferred size; whereas the latter will only use the explicitly set one, which if it has not been set, will just be an empty BRect. Fixes #15434, #18329. --- src/add-ons/translators/shared/BaseTranslator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/add-ons/translators/shared/BaseTranslator.cpp b/src/add-ons/translators/shared/BaseTranslator.cpp index b8eb064929..cc7405e0ba 100644 --- a/src/add-ons/translators/shared/BaseTranslator.cpp +++ b/src/add-ons/translators/shared/BaseTranslator.cpp @@ -675,7 +675,7 @@ BaseTranslator::MakeConfigurationView(BMessage *ioExtension, BView **outView, if (view) { *outView = view; if ((view->Flags() & B_SUPPORTS_LAYOUT) != 0) - view->ResizeTo(view->ExplicitPreferredSize()); + view->ResizeTo(view->PreferredSize()); *outExtent = view->Bounds();