cui/source/customize/acccfg.cxx |   12 ------------
 cui/source/inc/acccfg.hxx       |    2 --
 2 files changed, 14 deletions(-)

New commits:
commit 60a77c7ef46f6fa82b016c7605ec3451de291344
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Mon Nov 4 17:49:37 2024 -0900
Commit:     Jim Raykowski <rayk...@gmail.com>
CommitDate: Tue Nov 5 19:48:12 2024 +0100

    Resolves tdf#163770 BASIC Macro dialog Assign should select the macro
    
    name in Function list box in the Customize dialog Keyboard tab
    
    In SfxAcceleratorConfigPage Reset, RadioHdl is called just before
    m_xGroupLBox->SelectMacro. In RadioHdl an idle timer is started whos
    handler gets fired after m_xGroupLBox->SelectMacro is called in
    Reset. This makes the selection made in the functions list box by
    m_xGroupLBox->SelectMacro in Reset get bonked by the call to
    m_xGroupLBox->GroupSelected in SelectHdl called from the idle timer
    handler. m_xGroupLBox->GroupSelected always selects the first
    function in the function list box. This patch fixes this selection
    bonk by calling SelectHdl directly from RadioHdl instead of calling
    SelectHdl from an idle timer handler.
    
    Change-Id: I15d26d4611948d61e0a258e9a350d8c952b2b211
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176038
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <rayk...@gmail.com>

diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 04924b9a8f57..a83cc24e520e 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -863,7 +863,6 @@ 
SfxAcceleratorConfigPage::SfxAcceleratorConfigPage(weld::Container* pPage,
     , aFilterCfgStr(CuiResId(RID_CUISTR_FILTERNAME_CFG))
     , m_bStylesInfoInitialized(false)
     , m_aUpdateDataTimer("SfxAcceleratorConfigPage UpdateDataTimer")
-    , m_aFillGroupIdle("SfxAcceleratorConfigPage m_aFillGroupIdle")
     , m_xEntriesBox(m_xBuilder->weld_tree_view(u"shortcuts"_ustr))
     , m_xOfficeButton(m_xBuilder->weld_radio_button(u"office"_ustr))
     , m_xModuleButton(m_xBuilder->weld_radio_button(u"module"_ustr))
@@ -933,15 +932,10 @@ 
SfxAcceleratorConfigPage::SfxAcceleratorConfigPage(weld::Container* pPage,
 
     m_aUpdateDataTimer.SetInvokeHandler(LINK(this, SfxAcceleratorConfigPage, 
ImplUpdateDataHdl));
     m_aUpdateDataTimer.SetTimeout(EDIT_UPDATEDATA_TIMEOUT);
-
-    m_aFillGroupIdle.SetInvokeHandler(LINK(this, SfxAcceleratorConfigPage, 
TimeOut_Impl));
-    m_aFillGroupIdle.SetPriority(TaskPriority::HIGHEST);
 }
 
 SfxAcceleratorConfigPage::~SfxAcceleratorConfigPage()
 {
-    m_aFillGroupIdle.Stop();
-
     // free memory - remove all dynamic user data
     for (int i = 0, nCount = m_xEntriesBox->n_children(); i < nCount; ++i)
     {
@@ -1310,15 +1304,9 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, RadioHdl, 
weld::Toggleable&, void)
     if (m_xEntriesBox->n_children())
         m_xEntriesBox->select(0);
 
-    m_aFillGroupIdle.Start();
-}
-
-IMPL_LINK_NOARG(SfxAcceleratorConfigPage, TimeOut_Impl, Timer*, void)
-{
     // activating the selection, typically "all commands", can take a long time
     // -> show wait cursor and disable input
     weld::WaitObject aWaitObject(GetFrameWeld());
-
     weld::TreeView& rTreeView = m_xGroupLBox->get_widget();
     SelectHdl(rTreeView);
 }
diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx
index e9207d5a1add..32e4b7602d8b 100644
--- a/cui/source/inc/acccfg.hxx
+++ b/cui/source/inc/acccfg.hxx
@@ -105,8 +105,6 @@ private:
     Timer m_aUpdateDataTimer;
     i18nutil::SearchOptions2 m_options;
 
-    Idle m_aFillGroupIdle;
-
     std::unique_ptr<weld::TreeView> m_xEntriesBox;
     std::unique_ptr<weld::RadioButton> m_xOfficeButton;
     std::unique_ptr<weld::RadioButton> m_xModuleButton;

Reply via email to