From 0ddee515681192cf4c5aec629978a429976f22af Mon Sep 17 00:00:00 2001 From: Jinhao Date: Thu, 5 Nov 2015 00:43:27 +0800 Subject: [PATCH] swap the position of listbox::scorll's two parameters --- include/nana/gui/widgets/listbox.hpp | 2 +- source/gui/widgets/listbox.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nana/gui/widgets/listbox.hpp b/include/nana/gui/widgets/listbox.hpp index 2983d00b..b18f1ccc 100644 --- a/include/nana/gui/widgets/listbox.hpp +++ b/include/nana/gui/widgets/listbox.hpp @@ -557,7 +557,7 @@ By \a clicking on one header the list get \a reordered, first up, and then down void auto_draw(bool); ///< Set state: Redraw automatically after an operation /// Scrolls the view to the first or last item of a specified category - void scroll(size_type cat_pos, bool to_bottom); + void scroll(bool to_bottom, size_type cat_pos = ::nana::npos); /// Appends a new column with a header text and the specified width at the end, and return it position size_type append_header(nana::string header_text, unsigned width = 120); diff --git a/source/gui/widgets/listbox.cpp b/source/gui/widgets/listbox.cpp index 0610432e..557871b4 100644 --- a/source/gui/widgets/listbox.cpp +++ b/source/gui/widgets/listbox.cpp @@ -4230,7 +4230,7 @@ namespace nana _m_ess().set_auto_draw(ad); } - void listbox::scroll(size_type cat_pos, bool to_bottom) + void listbox::scroll(bool to_bottom, size_type cat_pos) { auto & ess = _m_ess(); auto cats = ess.lister.size_categ();