*ArrayCtrl: Fixed Find(Null) with disabled lines issue

git-svn-id: svn://ultimatepp.org/upp/trunk@2330 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2010-04-22 07:32:52 +00:00
parent 2b36de158f
commit f389291641

View file

@ -2106,7 +2106,7 @@ int ArrayCtrl::Find(const Value& v, int ii, int i) const {
ASSERT(ii >= 0);
int n = GetCount();
while(i < n) {
if(Get(i, ii) == v) return i;
if(IsLineEnabled(i) && Get(i, ii) == v) return i;
i++;
}
return -1;
@ -2120,7 +2120,6 @@ bool ArrayCtrl::FindSetCursor(const Value& val, int ii, int i) {
i = Find(val, ii, i);
if(i < 0) return false;
if(!SetCursor(i)) return false;
// CenterCursor(); //cxl: 2008-10-06: not what is expected...
return true;
}