.ArrayCtrl minor fix

git-svn-id: svn://ultimatepp.org/upp/trunk@2639 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2010-08-25 17:02:26 +00:00
parent d5bbddb36f
commit 1628c405d9

View file

@ -2453,8 +2453,11 @@ void ArrayCtrl::SwapDown() {
ArrayCtrl& ArrayCtrl::ColumnWidths(const char *s)
{
Vector<String> w = Split(s, ' ');
for(int i = 0; i < min(w.GetCount(), header.GetCount()); i++)
header.SetTabRatio(header.FindIndex(i), atoi(w[i]));
for(int i = 0; i < min(w.GetCount(), header.GetCount()); i++) {
int q = header.FindIndex(i);
if(q >= 0)
header.SetTabRatio(q, atoi(w[i]));
}
return *this;
}