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
This commit is contained in:
deveee 2013-10-05 19:15:14 +00:00
parent c54ee10ffc
commit 535d3c87fb
2 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@ ListWidget::ListWidget() : Widget(WTYPE_LIST)
m_icons = NULL; m_icons = NULL;
m_listener = NULL; m_listener = NULL;
m_selected_column = NULL; m_selected_column = NULL;
m_sort_desc = true; m_sort_desc = false;
m_sort_default = true; m_sort_default = true;
} }
@ -300,7 +300,7 @@ void ListWidget::elementRemoved()
} }
m_header_elements.clearAndDeleteAll(); m_header_elements.clearAndDeleteAll();
m_selected_column = NULL; m_selected_column = NULL;
m_sort_desc = true; m_sort_desc = false;
m_sort_default = true; m_sort_default = true;
} }
@ -378,8 +378,8 @@ EventPropagation ListWidget::transmitEvent(Widget* w,
} }
else else
{ {
m_sort_default = m_sort_desc && !m_sort_default;
if (!m_sort_default) m_sort_desc = !m_sort_desc; 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'; m_sort_col = originator[(m_properties[PROP_ID] + "_column_").size()] - '0';

View File

@ -136,7 +136,7 @@ void AddonsScreen::init()
m_reloading = false; m_reloading = false;
m_sort_desc = true; m_sort_desc = false;
m_sort_default = true; m_sort_default = true;
m_sort_col = 0; m_sort_col = 0;
@ -389,8 +389,8 @@ void AddonsScreen::onColumnClicked(int column_id)
} }
else else
{ {
m_sort_default = m_sort_desc && !m_sort_default;
if (!m_sort_default) m_sort_desc = !m_sort_desc; if (!m_sort_default) m_sort_desc = !m_sort_desc;
m_sort_default = !m_sort_desc && !m_sort_default;
} }
m_sort_col = column_id; m_sort_col = column_id;