Resolves: tdf#136494 get preferred height after contents filled in
an empty widget appears to be less tall than one with content in the default
Ubuntu theme
Change-Id: I6b759b37d6706e6a4c3ded492d9c5b23f322e328
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102133
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index e1f7986..bed1a0d 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -497,7 +497,6 @@ void AssignmentPersistentData::ImplCommit()
m_xFieldScroller = m_xBuilder->weld_scrolled_window("scrollwindow");
m_xFieldScroller->set_user_managed_scrolling();
m_xGrid = m_xBuilder->weld_widget("grid");
m_xFieldScroller->set_size_request(-1, m_xGrid->get_preferred_size().Height());
for (sal_Int32 row=0; row<FIELD_PAIRS_VISIBLE; ++row)
{
@@ -598,6 +597,8 @@ void AssignmentPersistentData::ImplCommit()
// initialize the field controls
resetFields();
// tdf#136494 wait until contents are filled before getting preferred height
m_xFieldScroller->set_size_request(-1, m_xGrid->get_preferred_size().Height());
m_xFieldScroller->vadjustment_set_value(0);
m_pImpl->nFieldScrollPos = -1;
implScrollFields(0, false, false);