mirror of
https://github.com/clangen/musikcube.git
synced 2024-10-02 04:52:32 +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) {
|
void ScrollAdapterBase::DrawPage(ScrollableWindow* scrollable, size_t index, ScrollPosition& result) {
|
||||||
WINDOW* window = scrollable->GetContent();
|
WINDOW* window = scrollable->GetContent();
|
||||||
|
|
||||||
if (!window) {
|
if (!scrollable->IsVisible() || !window || this->height == 0 || this->width == 0 || this->GetEntryCount() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
werase(window);
|
werase(window);
|
||||||
|
|
||||||
if (!scrollable->IsVisible() || !window || this->height == 0 || this->width == 0 || this->GetEntryCount() == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (index >= GetEntryCount()) {
|
if (index >= GetEntryCount()) {
|
||||||
index = GetEntryCount() - 1;
|
index = GetEntryCount() - 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user