Thread Tools Display Modes
10/17/15, 07:24 AM   #1
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Reviving because:
  1. sort by "name" is still hardcoded in ComboBoxSortHelper
  2. incorrect is-defined-tests of sortOrder (which may be ZO_SORT_ORDER_DOWN == false) are still there, only moved to ZO_ComboBox_Base:UpdateItems and ZO_ComboBox_Base:SetSortOrder
  3. found another such incorrect test in ZO_SortHeaderGroup:OnHeaderClicked
    Lua Code:
    1. function ZO_SortHeaderGroup:OnHeaderClicked(header, suppressCallbacks, forceReselect)
    2.     if self:IsEnabled() then
    3.         local resetSortDir = false
    4.         if forceReselect or not self:IsCurrentSelectedHeader(header) then
    5.             self:DeselectHeader()
    6.             resetSortDir = true
    7.         end
    8.  
    9.         -- this is wrong, initialDirection == false should be taken as valid value
    10.         self.sortDirection = resetSortDir and header.initialDirection or not self.sortDirection
    11. ...

    fixed:
    Lua Code:
    1. function ZO_SortHeaderGroup:OnHeaderClicked(header, suppressCallbacks, forceReselect)
    2.     if self:IsEnabled() then
    3.         if forceReselect or not self:IsCurrentSelectedHeader(header) then
    4.             self:DeselectHeader()
    5.             self.sortDirection = header.initialDirection
    6.         else
    7.             self.sortDirection = not self.sortDirection
    8.         end
    9. ...
 

ESOUI » Developer Discussions » Wish List » [outdated] ZO_ComboBox sort order

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off