diff options
author | Khaled Hosny <khaled@libreoffice.org> | 2023-09-05 20:37:25 +0300 |
---|---|---|
committer | خالد حسني <khaled@libreoffice.org> | 2023-09-12 14:14:52 +0200 |
commit | aa396ee162ee0eb223c90ab4f9bd55014cf94775 (patch) | |
tree | 5f6a2a87429502d4a076d86569c55fd9f900dfe3 /starmath | |
parent | 26313599b0eae3b397bb341c63d185f8771af82d (diff) |
starmath: Keep focus on math widget when inline editing is enabled
Since originally all editing happened in the edit window, it was made to
grab focus instead of the math widget, but we don’t want that anymore
when inline editing is enable as we want to edit everything in the math
widget.
This also removes ancient test that is now failing. We will eventually
drop the edit window altogether.
Change-Id: Ia1628a454bbbdd923ff582564eca1ab4ec830f38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156579
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/qa/unoapi/sm.sce | 1 | ||||
-rw-r--r-- | starmath/source/view.cxx | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/starmath/qa/unoapi/sm.sce b/starmath/qa/unoapi/sm.sce index 4e7b278a7ca2..b09f62c01055 100644 --- a/starmath/qa/unoapi/sm.sce +++ b/starmath/qa/unoapi/sm.sce @@ -15,7 +15,6 @@ # except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 . # --o sm.SmEditAccessible -o sm.SmGraphicAccessible -o sm.SmModel -o sm.XMLExporter diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 83b80d9c6ea7..c9a6303ba0e1 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -950,8 +950,8 @@ SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings *pBindings_, SfxChildWindow *pChildWi Hide(); - // Don't try to grab focus in LOK inline edit mode - if (!comphelper::LibreOfficeKit::isActive()) + // Don't try to grab focus in inline edit mode + if (!SmViewShell::IsInlineEditEnabled()) { aInitialFocusTimer.SetInvokeHandler(LINK(this, SmCmdBoxWindow, InitialFocusTimerHdl)); aInitialFocusTimer.SetTimeout(100); @@ -2322,7 +2322,7 @@ void SmViewShell::Activate( bool bIsMDIActivate ) { SfxViewShell::Activate( bIsMDIActivate ); - if (comphelper::LibreOfficeKit::isActive()) + if (IsInlineEditEnabled()) { // In LOK, activate in-place editing GetGraphicWidget().GrabFocus(); |