fix bug where listbox::item_proxy::empty behaves incorrectly

This commit is contained in:
Jinhao 2019-07-23 04:37:14 +08:00
parent 2e0f29564f
commit de9043e223
2 changed files with 5 additions and 1 deletions

View File

@ -824,6 +824,10 @@ namespace nana
/// Determines whether the item is displayed on the screen
bool displayed() const;
/// Determines whether the item_proxy refers to invalid item.
/**
* @return true if the item_proxy refers to an invalid item, false otherwise.
*/
bool empty() const noexcept;
/// Checks/unchecks the item

View File

@ -4762,7 +4762,7 @@ namespace nana
bool item_proxy::empty() const noexcept
{
return !ess_;
return !(ess_ && ess_->lister.good(pos_));
}
item_proxy & item_proxy::check(bool ck, bool scroll_view)