Index: ArrayCtrl.cpp =================================================================== --- ArrayCtrl.cpp (revision 11868) +++ ArrayCtrl.cpp (working copy) @@ -1423,9 +1423,9 @@ sel = true; } if(dosel && multiselect) { - ClearSelection(); + ClearSelection(false); anchor = cursor; - Select(cursor); + Select(cursor, true, false); sel = true; } if(sel) @@ -1489,13 +1489,15 @@ return selectcount; } -void ArrayCtrl::Select(int i, bool sel) +void ArrayCtrl::Select(int i, bool sel, bool raise) { array.At(i).select = sel; selectiondirty = true; RefreshRow(i); - WhenSelection(); - WhenSel(); + if(raise) { + WhenSelection(); + WhenSel(); + } SyncInfo(); } @@ -1541,7 +1543,7 @@ SyncInfo(); } -void ArrayCtrl::ClearSelection() +void ArrayCtrl::ClearSelection(bool raise) { if(IsSelection()) { for(int i = 0; i < array.GetCount(); i++) @@ -1551,8 +1553,10 @@ } selectiondirty = false; selectcount = 0; - WhenSelection(); - WhenSel(); + if(raise) { + WhenSelection(); + WhenSel(); + } SyncInfo(); } } @@ -1650,16 +1654,16 @@ { if(cursor >= 0 && multiselect) { if(flags & K_CTRL) { - Select(cursor, !IsSelected(cursor)); + Select(cursor, !IsSelected(cursor), false); anchor = cursor; } else { - ClearSelection(); + ClearSelection(false); if((flags & K_SHIFT) && anchor >= 0) Select(min(anchor, cursor), abs(anchor - cursor) + 1, true); else { anchor = cursor; - Select(cursor, true); + Select(cursor, true, false); } } Action(); Index: ArrayCtrl.h =================================================================== --- ArrayCtrl.h (revision 11868) +++ ArrayCtrl.h (working copy) @@ -452,10 +452,10 @@ int GetSelectCount() const; bool IsSelection() const { return GetSelectCount(); } - void Select(int i, bool sel = true); + void Select(int i, bool sel = true, bool raise = true); void Select(int i, int count, bool sel = true); bool IsSelected(int i) const { return i < array.GetCount() && array[i].select; } - void ClearSelection(); + void ClearSelection(bool raise = true); bool IsSel(int i) const; Vector GetSelKeys() const;