diff options
Diffstat (limited to 'sfx2/source/sidebar/PanelLayout.cxx')
-rw-r--r-- | sfx2/source/sidebar/PanelLayout.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sfx2/source/sidebar/PanelLayout.cxx b/sfx2/source/sidebar/PanelLayout.cxx index c419403bdf79..0e37e2278a73 100644 --- a/sfx2/source/sidebar/PanelLayout.cxx +++ b/sfx2/source/sidebar/PanelLayout.cxx @@ -18,6 +18,7 @@ using namespace sfx2::sidebar; PanelLayout::PanelLayout(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame) : Control(pParent) + , m_pInitialFocusWidget(nullptr) , m_bInClose(false) , mxFrame(rFrame) { @@ -34,6 +35,13 @@ PanelLayout::PanelLayout(vcl::Window* pParent, const OString& rID, const OUStrin m_xContainer = m_xBuilder->weld_container(rID); } +void PanelLayout::GetFocus() +{ + Control::GetFocus(); + if (m_pInitialFocusWidget) + m_pInitialFocusWidget->grab_focus(); +} + PanelLayout::~PanelLayout() { disposeOnce(); @@ -42,6 +50,7 @@ PanelLayout::~PanelLayout() void PanelLayout::dispose() { m_bInClose = true; + m_pInitialFocusWidget = nullptr; m_aPanelLayoutIdle.Stop(); m_xContainer.reset(); m_xBuilder.reset(); |