From 94923b51402a8c97a0b70f4344e9d2920d7c5f48 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Mon, 21 Mar 2016 11:06:11 +0000 Subject: Revert "tdf#96393: reuse layout if available" This reverts commit 9fdd671fb276a419089f26e47739c4a783d15e93. Not only introduced it the regression of https://bugs.documentfoundation.org/show_bug.cgi?id=98437 in that dialogs with options shown closed in a different size than they would be opened with options not shown now open in the previous closed size, but it also introduces regressions for dialogs with nested windows where if the initial layout is skipped for the remembered outer window size the inner windows are not initialized anymore. One example is the Calc Manage Names dialog, where the table is a nested window that now has an initial width 0 and thus the column headers that should be equally sized distributed are lumped together at the top left and only two are displayed instead of three and the table content is messed up. Change-Id: I319d931cde2b7b87261e4c04122b91cd0f64b117 Reviewed-on: https://gerrit.libreoffice.org/23402 Reviewed-by: pepp Reviewed-by: Eike Rathke Tested-by: Eike Rathke --- vcl/source/window/syswin.cxx | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'vcl') diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index cc9dd1f22bf2..cd348cff7728 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -641,14 +641,6 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) aState.mnWidth = rData.GetWidth(); aState.mnHeight = rData.GetHeight(); - if ( (aState.mnMask & SAL_FRAME_POSSIZE_X) && - (aState.mnMask & SAL_FRAME_POSSIZE_Y) && - (aState.mnMask & SAL_FRAME_POSSIZE_WIDTH) && - (aState.mnMask & SAL_FRAME_POSSIZE_HEIGHT) ) - { - mbInitialLayoutDone = true; - } - if( rData.GetMask() & (WINDOWSTATE_MASK_WIDTH|WINDOWSTATE_MASK_HEIGHT) ) { // #i43799# adjust window state sizes if a minimal output size was set @@ -1108,14 +1100,11 @@ void SystemWindow::DoInitialLayout() if (isLayoutEnabled()) { - if (!mbInitialLayoutDone) - { - mbIsCalculatingInitialLayoutSize = true; - setDeferredProperties(); - setOptimalLayoutSize(); - mbIsCalculatingInitialLayoutSize = false; - mbInitialLayoutDone = true; - } + mbIsCalculatingInitialLayoutSize = true; + setDeferredProperties(); + setOptimalLayoutSize(); + mbIsCalculatingInitialLayoutSize = false; + mbInitialLayoutDone = true; } else if (IsDialog() && !(GetStyle() & WB_SIZEABLE)) { -- cgit v1.2.3