Kaydet (Commit) e8a1db01 authored tarafından Jim Raykowski's avatar Jim Raykowski

tdf#123793 Follow up fix for kb nav of special chars popup

Static variable use to determine if initializing can focus properties of
recent and favorite controls is needed only allows init to ever happen
once. This patch changes use to a member variable. This corrects the
problem of kb navigation only works the the first time the popup is shown
and tab is used to navigate.

Change-Id: I2bbb66071b582c9a4282c79d801b4a36c375ed2d
Reviewed-on: https://gerrit.libreoffice.org/72264
Tested-by: Jenkins
Reviewed-by: 's avatarJim Raykowski <raykowj@gmail.com>
üst 64b37b33
......@@ -49,6 +49,7 @@ private:
std::deque<OUString> maFavCharList;
std::deque<OUString> maFavCharFontList;
VclPtr<Button> maDlgBtn;
bool mbNeedsInit = true;
DECL_LINK(CharClickHdl, SvxCharViewControl*, void);
DECL_STATIC_LINK(SfxCharmapCtrl, FocusHdl, Control&, void);
......
......@@ -184,7 +184,6 @@ void SfxCharmapCtrl::updateRecentCharControl()
bool SfxCharmapCtrl::EventNotify( NotifyEvent& rNEvt )
{
static bool bNeedsInit = true;
if ( maDlgBtn->HasFocus() && rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
{
const vcl::KeyCode& rKey = rNEvt.GetKeyEvent()->GetKeyCode();
......@@ -193,14 +192,14 @@ bool SfxCharmapCtrl::EventNotify( NotifyEvent& rNEvt )
{
return true;
}
if ( bNeedsInit && nCode == KEY_TAB )
if ( mbNeedsInit && nCode == KEY_TAB )
{
for(int i = 0; i < 16; i++)
{
m_pRecentCharView[i]->set_property( "can-focus", "true" );
m_pFavCharView[i]->set_property( "can-focus", "true" );
}
bNeedsInit = false;
mbNeedsInit = false;
}
}
return SfxPopupWindow::EventNotify( rNEvt );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment