Browse Source

fix pos in list popup

Laserlicht 1 month ago
parent
commit
15a85c2c5c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      client/windows/GUIClasses.cpp

+ 2 - 1
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<int> & _items, std::shared_ptr<CIntObject> titleWidget_, std::string _title, std::string _descr, std::function<void(int)> Callback, size_t initialSelection, std::vector<std::shared_ptr<IImage>> images, bool searchBoxEnabled, bool blue)