diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-02-24 14:32:21 +0000 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-02-25 10:52:46 +0100 |
commit | f7243a465fc75f8c29c1decb7628f7a8f6d1d769 (patch) | |
tree | ef596edfb394f85a64a5fce8a4c4e3b29141d0c1 | |
parent | 2465b0467d57ca325e820f13efeb40e69386b4a1 (diff) |
Resolves: rhbz#1931423 start update timer in IM events as well as keyevents
Change-Id: I5a72adebd34c3983e7a414110c3192d05b725e45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111490
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r-- | starmath/inc/edit.hxx | 1 | ||||
-rw-r--r-- | starmath/source/edit.cxx | 24 |
2 files changed, 17 insertions, 8 deletions
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx index 300a414d382b..60d0ad2bbb04 100644 --- a/starmath/inc/edit.hxx +++ b/starmath/inc/edit.hxx @@ -88,6 +88,7 @@ class SmEditWindow final : public vcl::Window, public DropTargetHelper void InitScrollBars(); void InvalidateSlots(); void UpdateStatus(bool bSetDocModified); + void UserPossiblyChangedText(); public: explicit SmEditWindow(SmCmdBoxWindow& rMyCmdBoxWin); diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index 64d1fc34757e..99ce7c008622 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -365,7 +365,10 @@ void SmEditWindow::Command(const CommandEvent& rCEvt) if (bForwardEvt) { if (pEditView) - pEditView->Command( rCEvt ); + { + pEditView->Command(rCEvt); + UserPossiblyChangedText(); + } else Window::Command (rCEvt); } @@ -476,13 +479,7 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt) } else { - // have doc-shell modified only for formula input/change and not - // cursor travelling and such things... - SmDocShell *pDocShell = GetDoc(); - EditEngine *pEditEngine = GetEditEngine(); - if (pDocShell && pEditEngine) - pDocShell->SetModified(pEditEngine->IsModified()); - aModifyIdle.Start(); + UserPossiblyChangedText(); } // get the current char of the key event @@ -510,6 +507,17 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt) } } +void SmEditWindow::UserPossiblyChangedText() +{ + // have doc-shell modified only for formula input/change and not + // cursor travelling and such things... + SmDocShell *pDocShell = GetDoc(); + EditEngine *pEditEngine = GetEditEngine(); + if (pDocShell && pEditEngine) + pDocShell->SetModified(pEditEngine->IsModified()); + aModifyIdle.Start(); +} + void SmEditWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) { if (!pEditView) |