diff options
author | Ilhan Yesil <ilhanyesil@gmx.de> | 2018-11-27 09:39:41 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2019-03-21 18:51:00 +0100 |
commit | 428d5f2449df8556b87c22663a7a48d1eec06bb7 (patch) | |
tree | 92bd5348d2e7552e863c4e115b9bffe9938f8173 /vcl | |
parent | e33e0e00788c268a6567520bcaaf0ebe23bc261c (diff) |
tdf#121671 Floating toolbars remain their position after reopen
Calculate the relative position of the floating toolbars by calling
the ImplCallMove function, where the current position is read from
the real window.
Change-Id: I6a142055c3340dda2339980fbc5a7ebb431e228b
Reviewed-on: https://gerrit.libreoffice.org/64093
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/floatwin.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index e632f97696b3..d6b44034c5bf 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -888,10 +888,22 @@ void FloatingWindow::EndPopupMode( FloatWinPopupEndFlags nFlags ) ImplEndPopupMode(nFlags, mxPrevFocusWin); } -void FloatingWindow::AddPopupModeWindow( vcl::Window* pWindow ) +void FloatingWindow::AddPopupModeWindow(vcl::Window* pWindow) { // !!! up-to-now only 1 window and not yet a list mpFirstPopupModeWin = pWindow; } +bool FloatingWindow::UpdatePositionData() +{ + auto pWin = ImplGetParent(); + if (pWin) + { + // Simulate Move, so the relative position of the floating window will be recalculated + pWin->ImplCallMove(); + return true; + } + + return false; +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |