mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 11:10:52 +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