fix bug that throws exception in listbox::column_at(#248)

This commit is contained in:
Jinhao 2017-08-31 04:36:09 +08:00
parent fba4097851
commit 29fc286ba3

View File

@ -433,8 +433,16 @@ namespace nana
{
check_range(pos, cont_.size());
//The order of cont_'s elements is the display order.
if (!disp_order)
pos = this->cast(pos, false);
{
/// It always match the item with pos, otherwise a bug occurs.
for (auto & m : cont_)
{
if (m.index == pos)
return m;
}
}
return cont_[pos];
}