Resolves: tdf#90384 queue_resize needs to Invalidate the optimal cache size
but the PanelLayout didn't Change-Id: I38a8975f1488fa2a2ffe91b66745e1a1c6c48a28
This commit is contained in:
@@ -1192,9 +1192,11 @@ protected:
|
||||
* the preferred widget size.
|
||||
*
|
||||
* Use get_preferred_size to retrieve this value
|
||||
* mediated via height and width requests
|
||||
* cached and mediated via height and width requests
|
||||
*/
|
||||
virtual Size GetOptimalSize() const;
|
||||
/// clear OptimalSize cache
|
||||
void InvalidateSizeCache();
|
||||
private:
|
||||
|
||||
SAL_DLLPRIVATE bool ImplIsAccessibleCandidate() const;
|
||||
|
@@ -51,6 +51,7 @@ void PanelLayout::queue_resize(StateChangedType /*eReason*/)
|
||||
return;
|
||||
if (!isLayoutEnabled(this))
|
||||
return;
|
||||
InvalidateSizeCache();
|
||||
m_aPanelLayoutIdle.Start();
|
||||
}
|
||||
|
||||
|
@@ -1114,9 +1114,7 @@ void DockingWindow::queue_resize(StateChangedType /*eReason*/)
|
||||
return;
|
||||
if (!isLayoutEnabled())
|
||||
return;
|
||||
WindowImpl *pWindowImpl = mpWindowImpl->mpBorderWindow ? mpWindowImpl->mpBorderWindow->mpWindowImpl : mpWindowImpl;
|
||||
pWindowImpl->mnOptimalWidthCache = -1;
|
||||
pWindowImpl->mnOptimalHeightCache = -1;
|
||||
InvalidateSizeCache();
|
||||
maLayoutIdle.Start();
|
||||
}
|
||||
|
||||
|
@@ -997,9 +997,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();
|
||||
maLayoutIdle.Start();
|
||||
}
|
||||
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user