diff --git a/client/windows/GUIClasses.cpp b/client/windows/GUIClasses.cpp index b59fae64e..9593fcead 100644 --- a/client/windows/GUIClasses.cpp +++ b/client/windows/GUIClasses.cpp @@ -1578,8 +1578,9 @@ void CObjectListWindow::CItem::clickDouble(const Point & cursorPosition) void CObjectListWindow::CItem::showPopupWindow(const Point & cursorPosition) { + int where = parent->itemsVisible[index].first; if(parent->onPopup) - parent->onPopup(index); + parent->onPopup(where); } CObjectListWindow::CObjectListWindow(const std::vector & _items, std::shared_ptr titleWidget_, std::string _title, std::string _descr, std::function Callback, size_t initialSelection, std::vector> images, bool searchBoxEnabled, bool blue)