diff --git a/Source/UI/ProbabilityTable/UIProbabilityTable.cpp b/Source/UI/ProbabilityTable/UIProbabilityTable.cpp index 8a444e5d..65beaa10 100644 --- a/Source/UI/ProbabilityTable/UIProbabilityTable.cpp +++ b/Source/UI/ProbabilityTable/UIProbabilityTable.cpp @@ -278,9 +278,9 @@ void CUIListBoxEx::AddNe this->items.clear(); this->selected = static_cast(-1); - if (this->rowHeight <= this->geometry.height) { + if (this->geometry.height >= this->rowHeight) { unsigned int count = static_cast(this->geometry.height / this->rowHeight) + 1; - if (this->geometry.height % this->rowHeight > 1) { + if (this->geometry.height % this->rowHeight >= 2) { ++count; } this->items.resize(count, nullptr);