[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Jan 3 20:21:32 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 6207c51880c9165eedb1d1af7fdc5e179bc8844d
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Jan 3 16:43:30 2019 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Thu Jan 3 21:21:10 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>
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index c398ad90f804..6fb5b68c2a16 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -4756,12 +4756,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();
}
}
}
@@ -4997,9 +4997,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 b8f473f35fe3..0f63aa229884 100644
--- a/sw/source/uibase/inc/edtwin.hxx
+++ b/sw/source/uibase/inc/edtwin.hxx
@@ -81,7 +81,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