slideshow/source/engine/slideoverlaybutton.cxx | 10 +++++++++- slideshow/source/engine/slideoverlaybutton.hxx | 1 + 2 files changed, 10 insertions(+), 1 deletion(-)
New commits: commit f0164f2755be1e759894601d6097ef70e0411f3d Author: Vladislav Tarakanov <vladislav.taraka...@bk.ru> AuthorDate: Thu Jan 4 20:09:38 2024 +0400 Commit: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> CommitDate: Mon Feb 5 12:58:07 2024 +0100 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.mehrbr...@allotropia.de> (cherry picked from commit ab320f4e11c70b50e5beddf12ad925f192941d9a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162904 diff --git a/slideshow/source/engine/slideoverlaybutton.cxx b/slideshow/source/engine/slideoverlaybutton.cxx index 40ade676b383..987cd11dfb8c 100644 --- a/slideshow/source/engine/slideoverlaybutton.cxx +++ b/slideshow/source/engine/slideoverlaybutton.cxx @@ -170,7 +170,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 db733a2b2cd4..7358743ee3e9 100644 --- a/slideshow/source/engine/slideoverlaybutton.hxx +++ b/slideshow/source/engine/slideoverlaybutton.hxx @@ -96,6 +96,7 @@ private: ViewsVecT maViews; ScreenUpdater& mrScreenUpdater; bool mbVisible = false; + sal_Int32 mnIgnoreClicksCnt = 0; }; }