From 5f40690efbc68185ba247411f4f6b1b95d5e1ef7 Mon Sep 17 00:00:00 2001 From: casey langen Date: Fri, 10 Apr 2020 21:49:57 -0700 Subject: [PATCH] Less awkward fix for werase() issue in ScrollAdapterBase. --- src/musikcube/cursespp/ScrollAdapterBase.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/musikcube/cursespp/ScrollAdapterBase.cpp b/src/musikcube/cursespp/ScrollAdapterBase.cpp index b3e5856de..8f61292e5 100755 --- a/src/musikcube/cursespp/ScrollAdapterBase.cpp +++ b/src/musikcube/cursespp/ScrollAdapterBase.cpp @@ -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; }