fix bug that treebox scroll_into_view wrongly calcuates a position
This commit is contained in:
parent
361bcbc81f
commit
284a153be0
@ -644,7 +644,7 @@ namespace nana
|
||||
auto const short_side = (std::min)(pos, last_pos - pos);
|
||||
if (short_side >= capacity / 2)
|
||||
{
|
||||
pos -= short_side;
|
||||
pos = short_side - capacity / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -665,6 +665,9 @@ namespace nana
|
||||
auto prv_first = shape.first;
|
||||
shape.first = attr.tree_cont.advance_if(nullptr, pos, drawerbase::treebox::pred_allow_child{});
|
||||
|
||||
//Update the position of scroll
|
||||
show_scroll();
|
||||
|
||||
return has_expanded || (prv_first != shape.first);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user