diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-01-15 16:39:08 +0000 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2021-01-18 00:44:26 +0100 |
commit | 6c315bbeb16db9dcf157f24803cff7c51ec18ed8 (patch) | |
tree | 393df15e3545e3ad51423ec6052f071ea74604ef /vcl | |
parent | d744883fe2cc26b1a5cec5f431541192d0672cc5 (diff) |
tdf#138829 don't grab focus to roadmap label when sync timer fires
Change-Id: Icc8a03a2ce5d63f3a2c477671a9aa52aefd1df96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109351
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/wizdlg.hxx | 2 | ||||
-rw-r--r-- | vcl/source/app/salvtables.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/roadmap.cxx | 5 | ||||
-rw-r--r-- | vcl/source/control/roadmapwizard.cxx | 4 |
4 files changed, 7 insertions, 6 deletions
diff --git a/vcl/inc/wizdlg.hxx b/vcl/inc/wizdlg.hxx index 32a6401a6799..7c6af8636260 100644 --- a/vcl/inc/wizdlg.hxx +++ b/vcl/inc/wizdlg.hxx @@ -145,7 +145,7 @@ namespace vcl void InsertRoadmapItem(int nIndex, const OUString& rLabel, int nId, bool bEnabled); void DeleteRoadmapItems(); int GetCurrentRoadmapItemID() const; - void SelectRoadmapItemByID(int nId); + void SelectRoadmapItemByID(int nId, bool bGrabFocus = true); void SetItemSelectHdl( const Link<LinkParamNone*,void>& _rHdl ); void ShowRoadmap(bool bShow); diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index e8dd4acd4808..b6e808ac9cc2 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -1902,7 +1902,7 @@ IMPL_LINK_NOARG(SalInstanceAssistant, UpdateRoadmap_Hdl, Timer*, void) m_xWizard->InsertRoadmapItem(nPos++, rLabel, m_aIds[i], bSensitive); } - m_xWizard->SelectRoadmapItemByID(m_aIds[get_current_page()]); + m_xWizard->SelectRoadmapItemByID(m_aIds[get_current_page()], false); m_xWizard->ShowRoadmap(nPos != 0); diff --git a/vcl/source/control/roadmap.cxx b/vcl/source/control/roadmap.cxx index f1df11cff5bb..bc6a9c125de8 100644 --- a/vcl/source/control/roadmap.cxx +++ b/vcl/source/control/roadmap.cxx @@ -523,7 +523,7 @@ void ORoadmap::GetFocus() pCurHyperLabel->GrabFocus(); } -bool ORoadmap::SelectRoadmapItemByID( ItemId _nNewID ) +bool ORoadmap::SelectRoadmapItemByID(ItemId _nNewID, bool bGrabFocus) { DeselectOldRoadmapItems(); RoadmapItem* pItem = GetByID( _nNewID ); @@ -534,7 +534,8 @@ bool ORoadmap::SelectRoadmapItemByID( ItemId _nNewID ) const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); pItem->ToggleBackgroundColor( rStyleSettings.GetHighlightColor() ); //HighlightColor - pItem->GrabFocus(); + if (bGrabFocus) + pItem->GrabFocus(); m_pImpl->setCurItemID(_nNewID); Select(); diff --git a/vcl/source/control/roadmapwizard.cxx b/vcl/source/control/roadmapwizard.cxx index d73cc1a18a5b..1b24e39cc4fc 100644 --- a/vcl/source/control/roadmapwizard.cxx +++ b/vcl/source/control/roadmapwizard.cxx @@ -827,9 +827,9 @@ namespace vcl m_xRoadmapImpl->pRoadmap->InsertRoadmapItem(nItemIndex, rText, nItemId, bEnable); } - void RoadmapWizard::SelectRoadmapItemByID(int nItemId) + void RoadmapWizard::SelectRoadmapItemByID(int nItemId, bool bGrabFocus) { - m_xRoadmapImpl->pRoadmap->SelectRoadmapItemByID(nItemId); + m_xRoadmapImpl->pRoadmap->SelectRoadmapItemByID(nItemId, bGrabFocus); } void RoadmapWizard::DeleteRoadmapItems() |