cui/source/dialogs/tipofthedaydlg.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d1d44e1dde7b1b6001e6b9c672770265ba9cb7db
Author:     Justin Luth <justin_l...@sil.org>
AuthorDate: Fri May 10 10:27:46 2019 +0300
Commit:     Heiko Tietze <tietze.he...@gmail.com>
CommitDate: Mon May 13 11:03:58 2019 +0200

    tdf#124743 TipOfTheDay: Next tip should not be random
    
    A user pressing "next tip" will expect to cycle sequentially
    through the list of tips, and not get a random one each time.
    
    Change-Id: I331d35d623b6449a9daef407a498b4ba08eaff6f
    Reviewed-on: https://gerrit.libreoffice.org/72099
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_l...@sil.org>
    Reviewed-by: Heiko Tietze <tietze.he...@gmail.com>

diff --git a/cui/source/dialogs/tipofthedaydlg.cxx 
b/cui/source/dialogs/tipofthedaydlg.cxx
index 0f634876ddd8..894768f5de99 100644
--- a/cui/source/dialogs/tipofthedaydlg.cxx
+++ b/cui/source/dialogs/tipofthedaydlg.cxx
@@ -127,8 +127,8 @@ IMPL_LINK_NOARG(TipOfTheDayDialog, OnLinkClick, 
weld::LinkButton&, void)
 
 IMPL_LINK_NOARG(TipOfTheDayDialog, OnNextClick, weld::Button&, void)
 {
-    nCurrentTip = rand() % nNumberOfTips;
+    nCurrentTip = (nCurrentTip + 1) % nNumberOfTips;
     UpdateTip();
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to