From 535d3c87fb227ef658bd3e93f0d6a755910ef9b9 Mon Sep 17 00:00:00 2001 From: deveee Date: Sat, 5 Oct 2013 19:15:14 +0000 Subject: [PATCH] Fixed regression since r12673. Add-ons were sorting from "z" to "a" in default mode. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14209 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/guiengine/widgets/list_widget.cpp | 6 +++--- src/states_screens/addons_screen.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/guiengine/widgets/list_widget.cpp b/src/guiengine/widgets/list_widget.cpp index df0acff87..04ef0d741 100644 --- a/src/guiengine/widgets/list_widget.cpp +++ b/src/guiengine/widgets/list_widget.cpp @@ -38,7 +38,7 @@ ListWidget::ListWidget() : Widget(WTYPE_LIST) m_icons = NULL; m_listener = NULL; m_selected_column = NULL; - m_sort_desc = true; + m_sort_desc = false; m_sort_default = true; } @@ -300,7 +300,7 @@ void ListWidget::elementRemoved() } m_header_elements.clearAndDeleteAll(); m_selected_column = NULL; - m_sort_desc = true; + m_sort_desc = false; m_sort_default = true; } @@ -378,8 +378,8 @@ EventPropagation ListWidget::transmitEvent(Widget* w, } else { - m_sort_default = m_sort_desc && !m_sort_default; if (!m_sort_default) m_sort_desc = !m_sort_desc; + m_sort_default = !m_sort_desc && !m_sort_default; } m_sort_col = originator[(m_properties[PROP_ID] + "_column_").size()] - '0'; diff --git a/src/states_screens/addons_screen.cpp b/src/states_screens/addons_screen.cpp index 56e18e85f..fc828cbd4 100644 --- a/src/states_screens/addons_screen.cpp +++ b/src/states_screens/addons_screen.cpp @@ -136,7 +136,7 @@ void AddonsScreen::init() m_reloading = false; - m_sort_desc = true; + m_sort_desc = false; m_sort_default = true; m_sort_col = 0; @@ -389,8 +389,8 @@ void AddonsScreen::onColumnClicked(int column_id) } else { - m_sort_default = m_sort_desc && !m_sort_default; if (!m_sort_default) m_sort_desc = !m_sort_desc; + m_sort_default = !m_sort_desc && !m_sort_default; } m_sort_col = column_id;