X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flist.cpp;h=710d1fc6fa7cf7c05e2fe88e5c6349aa018cf298;hb=319cde3c06181ba1c3619567525002926d8b4889;hp=378bf707c1a7d702f2192d50b0da8cd2ea70d9bc;hpb=d75275638b2dfeb5e346c42ec2c4498da3671042;p=libs%2Fgltk.git diff --git a/source/list.cpp b/source/list.cpp index 378bf70..710d1fc 100644 --- a/source/list.cpp +++ b/source/list.cpp @@ -64,15 +64,16 @@ void List::autosize_rows(unsigned n) unsigned max_w = 0; unsigned total_h = 0; - for(unsigned i=0; (iautosize(); const Geometry &igeom = items[i]->get_geometry(); max_w = max(max_w, igeom.w); - total_h += igeom.h; + if(i(l) +{ + add("item", &Loader::item); +} + void List::Loader::item(const string &v) { - dynamic_cast &>(*dynamic_cast(obj).data).append(v); + dynamic_cast &>(*obj.data).append(v); } } // namespace GLtk