mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
*CtrlLib: ArrayCtrl fixed cornercase issue with sort and embedded widgets
git-svn-id: svn://ultimatepp.org/upp/trunk@4217 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
b332157db3
commit
988e66ad80
3 changed files with 22 additions and 3 deletions
|
|
@ -2215,7 +2215,7 @@ void ArrayCtrl::SortA()
|
|||
if(IsCtrl(i, j)) {
|
||||
const Column& m = column[j];
|
||||
ASSERT(m.pos.GetCount() == 1);
|
||||
array[i].line[m.pos[0]] = GetCellCtrl(i, j).ctrl->GetData();
|
||||
array[i].line.At(m.pos[0]) = GetCellCtrl(i, j).ctrl->GetData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2244,7 +2244,7 @@ void ArrayCtrl::SortB(const Vector<int>& o)
|
|||
if(IsCtrl(i, j)) {
|
||||
const Column& m = column[j];
|
||||
ASSERT(m.pos.GetCount() == 1);
|
||||
array[i].line[m.pos[0]] = Null;
|
||||
array[i].line.At(m.pos[0]) = Null;
|
||||
}
|
||||
SyncCtrls();
|
||||
ChildGotFocus();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#define _CtrlLib_icpp_init_stub
|
||||
#include "CtrlCore/init"
|
||||
#include "PdfDraw/init"
|
||||
#define BLITZ_INDEX__ FFAA79F95F953AAC96883EC967C32C291
|
||||
#define BLITZ_INDEX__ Fa588a2a7bb40a3ed36760f6c2bef5026
|
||||
#include "CtrlLib.icpp"
|
||||
#undef BLITZ_INDEX__
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1196,12 +1196,31 @@ Header]()&]
|
|||
[s2; Same as MovingHeader(false).&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:ArrayCtrl`:`:ColumnSortFindKey`(bool`):%- [_^ArrayCtrl^ ArrayCtrl][@(0.0.255) `&]_[* C
|
||||
olumnSortFindKey]([@(0.0.255) bool]_[*@3 b]_`=_[@(0.0.255) true])&]
|
||||
[s2; Before ColumnSort orders the ArrayCtrl, the key of current row
|
||||
(with cursor) is stored and after sorting, it is restored.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:ArrayCtrl`:`:AllSorting`(`):%- [_^ArrayCtrl^ ArrayCtrl][@(0.0.255) `&]_[* AllSorting](
|
||||
)&]
|
||||
[s2; If set, Sorting() is invoked for all columns (added either before
|
||||
or after this modifier is called).&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:ArrayCtrl`:`:ColumnSortSecondary`(const ArrayCtrl`:`:Order`&`):%- [_^ArrayCtrl^ Ar
|
||||
rayCtrl][@(0.0.255) `&]_[* ColumnSortSecondary]([@(0.0.255) const]_[_^ArrayCtrl`:`:Order^ O
|
||||
rder][@(0.0.255) `&]_[*@3 order])&]
|
||||
[s2; Sets secondary sorting predicate for column sorts (see ColumnSort,
|
||||
Sorting) `- if two cells are equal when performing sort by column,
|
||||
they are ordered by this predicate.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:ArrayCtrl`:`:NoColumnSortSecondary`(`):%- [_^ArrayCtrl^ ArrayCtrl][@(0.0.255) `&]_[* N
|
||||
oColumnSortSecondary]()&]
|
||||
[s2; Same as ColumnSortSecondary(false).&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:ArrayCtrl`:`:ColumnWidths`(const char`*`):%- [_^ArrayCtrl^ ArrayCtrl][@(0.0.255) `&]_
|
||||
[* ColumnWidths]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 s])&]
|
||||
[s2; Initializes column widths based on a text string containing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue