mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.CtrlLib/ArrayCtrl.cpp: bug fix - activation of AppendLine together with MultiSelect highlighted two 'cursor' rows
git-svn-id: svn://ultimatepp.org/upp/trunk@4150 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c5826d7b94
commit
242f9ebcdc
6 changed files with 931 additions and 1114 deletions
|
|
@ -1481,8 +1481,11 @@ void ArrayCtrl::Page(int q) {
|
|||
|
||||
void ArrayCtrl::DoPoint(Point p, bool dosel) {
|
||||
p.y += sb;
|
||||
if(p.y >= GetTotalCy() && IsAppendLine())
|
||||
if(p.y >= GetTotalCy() && IsAppendLine()) {
|
||||
if(IsMultiSelect())
|
||||
ClearSelection();
|
||||
KillCursor();
|
||||
}
|
||||
clickpos.y = GetLineAt(p.y);
|
||||
if(!IsNull(clickpos.y))
|
||||
SetCursor0(clickpos.y, dosel);
|
||||
|
|
@ -1787,8 +1790,11 @@ bool ArrayCtrl::Key(dword key, int) {
|
|||
return true;
|
||||
case K_DOWN:
|
||||
case K_SHIFT_DOWN:
|
||||
if((IsInserting() || IsAppending()) && IsAppendLine() && cursor == GetCount() - 1 && !editmode)
|
||||
if((IsInserting() || IsAppending()) && IsAppendLine() && cursor == GetCount() - 1 && !editmode) {
|
||||
if(IsMultiSelect())
|
||||
ClearSelection();
|
||||
KillCursor();
|
||||
}
|
||||
else
|
||||
if(IsCursor()) {
|
||||
int d = GetEditColumn();
|
||||
|
|
@ -1835,9 +1841,11 @@ bool ArrayCtrl::AcceptEnter() {
|
|||
if(!Accept())
|
||||
return false;
|
||||
if(GetCursor() == array.GetCount() - 1 &&
|
||||
(IsInserting() || IsAppending()) && IsAppendLine() && ins && !noinsertappend) {
|
||||
KillCursor();
|
||||
ShowAppendLine();
|
||||
(IsInserting() || IsAppending()) && IsAppendLine() && ins && !noinsertappend) {
|
||||
if(IsMultiSelect())
|
||||
ClearSelection();
|
||||
KillCursor();
|
||||
ShowAppendLine();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue