fix bug that inline widgets aren't closed when lsitbox clears

This commit is contained in:
Jinhao 2018-02-10 07:28:54 +08:00
parent 0d6e9e042b
commit 176d9e5dd9

View File

@ -3433,6 +3433,8 @@ namespace nana
rect.y - static_cast<int>(origin.y % item_height_px) rect.y - static_cast<int>(origin.y % item_height_px)
}; };
essence_->inline_buffered_table.swap(essence_->inline_table);
// The first display is empty when the listbox is empty. // The first display is empty when the listbox is empty.
if (!first_disp.empty()) if (!first_disp.empty())
{ {
@ -3455,8 +3457,6 @@ namespace nana
auto idx = first_disp; auto idx = first_disp;
essence_->inline_buffered_table.swap(essence_->inline_table);
for (auto & cat : lister.cat_container()) for (auto & cat : lister.cat_container())
for (auto & ind : cat.indicators) for (auto & ind : cat.indicators)
{ {
@ -3526,9 +3526,9 @@ namespace nana
++idx.item; ++idx.item;
} }
} }
}
essence_->inline_buffered_table.clear(); essence_->inline_buffered_table.clear();
}
if (item_coord.y < rect.bottom()) if (item_coord.y < rect.bottom())
{ {