1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fixed CID 1366365, CID 1288839

This commit is contained in:
AlexVinS 2016-11-25 19:58:52 +03:00
parent 6a616a5d33
commit 8b6543bef2

View File

@ -1732,7 +1732,8 @@ void CObjectListWindow::CItem::clickLeft(tribool down, bool previousState)
CObjectListWindow::CObjectListWindow(const std::vector<int> &_items, CIntObject * titlePic, std::string _title, std::string _descr,
std::function<void(int)> Callback):
CWindowObject(PLAYER_COLORED, "TPGATE"),
onSelect(Callback)
onSelect(Callback),
selected(0)
{
items.reserve(_items.size());
for(int id : _items)
@ -1746,7 +1747,8 @@ CObjectListWindow::CObjectListWindow(const std::vector<int> &_items, CIntObject
CObjectListWindow::CObjectListWindow(const std::vector<std::string> &_items, CIntObject * titlePic, std::string _title, std::string _descr,
std::function<void(int)> Callback):
CWindowObject(PLAYER_COLORED, "TPGATE"),
onSelect(Callback)
onSelect(Callback),
selected(0)
{
items.reserve(_items.size());