Skip to content

Commit c8ed61b

Browse files
committedJun 17, 2013
Fix calculation of selected item (for not drawing it) in formspec
The previous code did not work when the list did not start at index 0 of the inventory list (issue #779).
1 parent 816ffa9 commit c8ed61b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/guiFormSpecMenu.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ void GUIFormSpecMenu::drawList(const ListDrawSpec &s, int phase)
698698
bool selected = m_selected_item
699699
&& m_invmgr->getInventory(m_selected_item->inventoryloc) == inv
700700
&& m_selected_item->listname == s.listname
701-
&& m_selected_item->i == i;
701+
&& m_selected_item->i == item_i;
702702
bool hovering = rect.isPointInside(m_pointer);
703703

704704
if(phase == 0)

0 commit comments

Comments
 (0)
Please sign in to comment.