slideshow/source/engine/slideoverlaybutton.cxx | 10 +++++++++- slideshow/source/engine/slideoverlaybutton.hxx | 1 + 2 files changed, 10 insertions(+), 1 deletion(-)
New commits: commit ab320f4e11c70b50e5beddf12ad925f192941d9a 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 07:15:06 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> 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; }; }