diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-04-09 14:43:09 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-04-14 14:40:46 +0200 |
commit | e2bac0ce8c1a256a20efc1edd2ac27df248b0e56 (patch) | |
tree | 9cfbfebf6c7c37a78f841751b8f12c69a4f3eab6 /vcl | |
parent | 03f3e08aac8ca5e82ebf4230f72729099a7dbaa0 (diff) |
Resolves: tdf#90384 queue_resize needs to Invalidate the optimal cache size
but the PanelLayout didn't
(cherry picked from commit b39a6449d5debc7cdf55c3f967b441f3de4d50f3)
Conflicts:
svx/source/sidebar/PanelLayout.cxx
vcl/source/window/dockwin.cxx
vcl/source/window/syswin.cxx
Change-Id: I38a8975f1488fa2a2ffe91b66745e1a1c6c48a28
Reviewed-on: https://gerrit.libreoffice.org/15215
Tested-by: David Tardon <dtardon@redhat.com>
Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/syswin.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/window2.cxx | 13 |
2 files changed, 11 insertions, 6 deletions
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 6ecf711d75ac..f694081aa4f8 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -994,9 +994,7 @@ void SystemWindow::queue_resize(StateChangedType /*eReason*/) return; if (!isLayoutEnabled()) return; - WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl; - pWindowImpl->mnOptimalWidthCache = -1; - pWindowImpl->mnOptimalHeightCache = -1; + InvalidateSizeCache(); maLayoutTimer.Start(); } diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 8fe7d9d88416..e4388d88840b 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1427,16 +1427,23 @@ namespace } } +void Window::InvalidateSizeCache() +{ + WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl; + pWindowImpl->mnOptimalWidthCache = -1; + pWindowImpl->mnOptimalHeightCache = -1; +} + void Window::queue_resize(StateChangedType eReason) { bool bSomeoneCares = queue_ungrouped_resize(this); - WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl; if (eReason != StateChangedType::VISIBLE) { - pWindowImpl->mnOptimalWidthCache = -1; - pWindowImpl->mnOptimalHeightCache = -1; + InvalidateSizeCache(); } + + WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl; if (pWindowImpl->m_xSizeGroup && pWindowImpl->m_xSizeGroup->get_mode() != VCL_SIZE_GROUP_NONE) { std::set<vcl::Window*> &rWindows = pWindowImpl->m_xSizeGroup->get_widgets(); |