[2.0.10] LV.Opt("+NoSort") doesn't work! Topic is solved

Report problems with documented functionality
just me
Posts: 9560
Joined: 02 Oct 2013, 08:51
Location: Germany

[2.0.10] LV.Opt("+NoSort") doesn't work!

27 Nov 2023, 04:36

As the subject says ...

Related: viewtopic.php?p=548830#p548830
denis_q2
Posts: 4
Joined: 24 May 2023, 11:36

Re: [2.0.10] LV.Opt("+NoSort") doesn't work!

28 Nov 2023, 04:02

script_gui.cpp

Code: Select all

2727 ResultType GuiType::AddControl(GuiControls aControlType, LPCTSTR aOptions, LPCTSTR aText, GuiControlType*& apControl, Array *aObj)
2981     if (!ControlParseOptions(aOptions, opt, control))
4090     control.union_lv_attrib->no_auto_sort = opt.listview_no_auto_sort;

Code: Select all

 769 FResult GuiControlType::Opt(StrArg aOptions)
 774 if (!gui->ControlParseOptions(aOptions, go, *this, GUI_HWND_TO_INDEX(hwnd)))
Could it be because the assignment corresponding to line 4090 is missing in 'GuiControlType::Opt'?
lexikos
Posts: 9688
Joined: 30 Sep 2013, 04:07
Contact:

Re: [2.0.10] LV.Opt("+NoSort") doesn't work!

19 Dec 2023, 21:55

An unconditional assignment would cause NoSort to be undone if Opt is called without that option (e.g. to set some other option). The change to no_auto_sort needs to be made inside ControlParseOptions, which can differentiate between the presence of -NoSort and the absence of NoSort in some other string of options. See commit cc356bc6.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 13 guests