diff options
Diffstat (limited to 'basctl/source/basicide/IDEComboBox.cxx')
-rw-r--r-- | basctl/source/basicide/IDEComboBox.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/basctl/source/basicide/IDEComboBox.cxx b/basctl/source/basicide/IDEComboBox.cxx index 87a45e5a9c22..e295e44ff1ed 100644 --- a/basctl/source/basicide/IDEComboBox.cxx +++ b/basctl/source/basicide/IDEComboBox.cxx @@ -194,14 +194,20 @@ void LibBox::ReleaseFocus() SfxViewShell* pCurSh = SfxViewShell::Current(); DBG_ASSERT(pCurSh, "Current ViewShell not found!"); - if (pCurSh) - { - vcl::Window* pShellWin = pCurSh->GetWindow(); - if (!pShellWin) - pShellWin = Application::GetDefDialogParent(); + if (!pCurSh) + return; + vcl::Window* pShellWin = pCurSh->GetWindow(); + if (pShellWin) + { pShellWin->GrabFocus(); + return; } + + weld::Window* pWin = Application::GetDefDialogParent(); + if (!pWin) + return; + pWin->grab_focus(); } void LibBox::FillBox() |