[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Jan 7 09:48:42 UTC 2019
sw/source/uibase/docvw/edtwin.cxx | 10 +++++-----
sw/source/uibase/inc/edtwin.hxx | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 3d6ca7b271de18ba27a4d71ca7feef452e38c47c
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Jan 3 16:43:30 2019 +0300
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jan 7 10:48:19 2019 +0100
tdf#122442: use Timer to detect single-clicks vs double-clicks
Regression from commit 821ae0fb9fa63e0171f987d5ec210ec121978b8f which
appeared after commits changing scheduler/main loop in the range
e6e8a060ecc6e4fd51cfe88e00d841d546ed5915..9b4abcd1c45a646a1ac9120fe1c489ba6bb44e95
Change-Id: I6cf58c1e83aa9621bdd4b5c14f8565d5c69e20c1
Reviewed-on: https://gerrit.libreoffice.org/65837
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
(cherry picked from commit 6207c51880c9165eedb1d1af7fdc5e179bc8844d)
Reviewed-on: https://gerrit.libreoffice.org/65842
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 3be0d47726de..c892f902fed0 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -4761,12 +4761,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
rSh.EnterStdMode();
rSh.SetVisibleCursor(aDocPt);
bCallBase = false;
- m_aTemplateIdle.Stop();
+ m_aTemplateTimer.Stop();
}
else if(rMEvt.GetClicks() == 1)
{
// no selection -> so turn off watering can
- m_aTemplateIdle.Start();
+ m_aTemplateTimer.Start();
}
}
}
@@ -5007,9 +5007,9 @@ SwEditWin::SwEditWin(vcl::Window *pParent, SwView &rMyView):
m_aKeyInputFlushTimer.SetInvokeHandler(LINK(this, SwEditWin, KeyInputFlushHandler));
// TemplatePointer for colors should be resetted without
- // selection after single click
- m_aTemplateIdle.SetPriority(TaskPriority::LOWEST);
- m_aTemplateIdle.SetInvokeHandler(LINK(this, SwEditWin, TemplateTimerHdl));
+ // selection after single click, but not after double-click (tdf#122442)
+ m_aTemplateTimer.SetTimeout(GetSettings().GetMouseSettings().GetDoubleClickTime());
+ m_aTemplateTimer.SetInvokeHandler(LINK(this, SwEditWin, TemplateTimerHdl));
// temporary solution!!! Should set the font of the current
// insert position at every cursor movement!
diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx
index 091b787d3a3c..b383025d5e57 100644
--- a/sw/source/uibase/inc/edtwin.hxx
+++ b/sw/source/uibase/inc/edtwin.hxx
@@ -80,7 +80,7 @@ class SwEditWin final : public vcl::Window,
Point m_aStartPos;
Point m_aMovePos;
Point m_aRszMvHdlPt;
- Idle m_aTemplateIdle;
+ Timer m_aTemplateTimer;
// type/object where the mouse pointer is
SwCallMouseEvent m_aSaveCallEvent;
More information about the Libreoffice-commits
mailing list