diff options
author | Vladislav Tarakanov <vladislav.tarakanov@bk.ru> | 2024-01-04 20:09:38 +0400 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2024-02-05 07:15:06 +0100 |
commit | ab320f4e11c70b50e5beddf12ad925f192941d9a (patch) | |
tree | 6051ea866368fc1d69525e758d9c680f2f3ad2ef /slideshow | |
parent | 4d381b54d1c598c181b4a21a8bf0db86eb4668d1 (diff) |
tdf#158924 Handle multi-clicks for navigation bar
Added handling for navigation bar buttons when many quick
clicks have been made. To do this, after processing the first click,
the number of clicks in the series is stored in a new variable.
Until the entire series of clicks has been processed, the slide
switch will not occur.
Change-Id: I8f4416a0c7928bb78609be8ff52252782c37f5a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161625
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/source/engine/slideoverlaybutton.cxx | 10 | ||||
-rw-r--r-- | slideshow/source/engine/slideoverlaybutton.hxx | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/slideshow/source/engine/slideoverlaybutton.cxx b/slideshow/source/engine/slideoverlaybutton.cxx index 14b78337e489..2d2cb62ebeba 100644 --- a/slideshow/source/engine/slideoverlaybutton.cxx +++ b/slideshow/source/engine/slideoverlaybutton.cxx @@ -172,7 +172,15 @@ bool SlideOverlayButton::handleMouseReleased(const css::awt::MouseEvent& e) && clickPnt.getY() > btnPnt.getY() && clickPnt.getY() < btnPnt.getY() + mxIconBitmap->getSize().Height) { - mClickHandler(clickPnt); + if (mnIgnoreClicksCnt == 0) + { + mnIgnoreClicksCnt = e.ClickCount - 1; + mClickHandler(clickPnt); + } + else + { + mnIgnoreClicksCnt--; + } return true; } return false; diff --git a/slideshow/source/engine/slideoverlaybutton.hxx b/slideshow/source/engine/slideoverlaybutton.hxx index e872a821d3b7..ceec9eed7b59 100644 --- a/slideshow/source/engine/slideoverlaybutton.hxx +++ b/slideshow/source/engine/slideoverlaybutton.hxx @@ -97,6 +97,7 @@ private: ViewsVecT maViews; ScreenUpdater& mrScreenUpdater; bool mbVisible = false; + sal_Int32 mnIgnoreClicksCnt = 0; }; } |