diff --git a/source/gui/ObjectTypes/CDropDown.cpp b/source/gui/ObjectTypes/CDropDown.cpp index 48bf1b7550..fc0eac69dd 100644 --- a/source/gui/ObjectTypes/CDropDown.cpp +++ b/source/gui/ObjectTypes/CDropDown.cpp @@ -476,11 +476,11 @@ void CDropDown::Draw() DrawText(m_Selected, m_Enabled ? m_TextColorSelected : m_TextColorDisabled, pos, bz + 0.1f, cliparea); } - // Disable scrollbar during drawing without sending a setting-changed message - bool old = m_ScrollBar; - if (m_Open) { + // Disable scrollbar during drawing without sending a setting-changed message + const bool old = m_ScrollBar; + // TODO: drawScrollbar as an argument of DrawList? if (m_HideScrollBar) m_ScrollBar = false; diff --git a/source/gui/ObjectTypes/CList.cpp b/source/gui/ObjectTypes/CList.cpp index 2727e32d5e..030b602fa1 100644 --- a/source/gui/ObjectTypes/CList.cpp +++ b/source/gui/ObjectTypes/CList.cpp @@ -330,10 +330,6 @@ void CList::DrawList(const int& selected, const CGUISpriteInstance& sprite, cons { float bz = GetBufferedZ(); - // First call draw on ScrollBarOwner - if (m_ScrollBar) - IGUIScrollBarOwner::Draw(); - { CRect rect = GetListRect(); @@ -396,6 +392,9 @@ void CList::DrawList(const int& selected, const CGUISpriteInstance& sprite, cons DrawText(i, textcolor, rect.TopLeft() - CVector2D(0.f, scroll - m_ItemsYPositions[i]), bz + 0.1f, cliparea); } } + + if (m_ScrollBar) + IGUIScrollBarOwner::Draw(); } void CList::AddItem(const CGUIString& str, const CGUIString& data)