mirror of
https://github.com/clangen/musikcube.git
synced 2024-12-27 03:14:30 +00:00
Less awkward fix for werase() issue in ScrollAdapterBase.
This commit is contained in:
parent
23b274bce9
commit
5f40690efb
@ -112,16 +112,12 @@ size_t ScrollAdapterBase::GetVisibleItems(
|
||||
void ScrollAdapterBase::DrawPage(ScrollableWindow* scrollable, size_t index, ScrollPosition& result) {
|
||||
WINDOW* window = scrollable->GetContent();
|
||||
|
||||
if (!window) {
|
||||
if (!scrollable->IsVisible() || !window || this->height == 0 || this->width == 0 || this->GetEntryCount() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
werase(window);
|
||||
|
||||
if (!scrollable->IsVisible() || !window || this->height == 0 || this->width == 0 || this->GetEntryCount() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (index >= GetEntryCount()) {
|
||||
index = GetEntryCount() - 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user