fix column_cast doesn't ignore invisible column
This commit is contained in:
parent
8e10f743e1
commit
b9d8ac3f9d
@ -437,16 +437,24 @@ namespace nana
|
|||||||
if (pos >= cont_.size())
|
if (pos >= cont_.size())
|
||||||
throw std::out_of_range("listbox: invalid header index.");
|
throw std::out_of_range("listbox: invalid header index.");
|
||||||
|
|
||||||
if (disp_order)
|
size_type order = 0; //order for display position
|
||||||
return cont_[pos].index;
|
|
||||||
|
|
||||||
size_type order = 0;
|
|
||||||
for (auto & m : cont_)
|
for (auto & m : cont_)
|
||||||
{
|
{
|
||||||
if (m.index == pos)
|
if (!m.visible_state)
|
||||||
return order;
|
continue;
|
||||||
|
|
||||||
++order;
|
if (disp_order)
|
||||||
|
{
|
||||||
|
if (0 == pos)
|
||||||
|
return m.index;
|
||||||
|
++pos;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (m.index == pos)
|
||||||
|
return order;
|
||||||
|
++order;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw std::invalid_argument("listbox: invalid header index");
|
throw std::invalid_argument("listbox: invalid header index");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user