reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit cfff6ea8fa9f2b1e319ec0ba2d2a77b245aad869
parent 5712f26dc97934007bcca1d62a453ae0ede74e2a
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Fri,  8 Apr 2016 18:51:12 -0700

ignore case when sorting list views

Diffstat:
Msrc/listview.cpp | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/listview.cpp b/src/listview.cpp @@ -17,6 +17,8 @@ #include "listview.hpp" +#include <boost/algorithm/string.hpp> + #ifdef _WIN32 #include <commctrl.h> #endif @@ -127,8 +129,11 @@ void ListView::sortByColumn(const int index, const SortOrder order) ListView *view = reinterpret_cast<ListView *>(param); const int column = view->m_sortColumn; - const auto_string &a = view->m_rows[aRow][column]; - const auto_string &b = view->m_rows[bRow][column]; + auto_string a = view->m_rows[aRow][column]; + boost::algorithm::to_lower(a); + + auto_string b = view->m_rows[bRow][column]; + boost::algorithm::to_lower(b); const int ret = a.compare(b);