mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #17544: Placement rule in Invention List window does not move
This commit is contained in:
parent
3a5a8d4f78
commit
7f33e4886d
|
@ -509,6 +509,12 @@ public:
|
|||
return item == _selectedResearchItem;
|
||||
}
|
||||
|
||||
// hack to fix #17544: OnScrollMouseOver never gets called while dragging
|
||||
void SetSelectedResearchItem(ResearchItem* item)
|
||||
{
|
||||
_selectedResearchItem = item;
|
||||
}
|
||||
|
||||
void MoveResearchItem(const ResearchItem& item, ResearchItem* beforeItem, bool isInvented)
|
||||
{
|
||||
_selectedResearchItem = nullptr;
|
||||
|
@ -597,6 +603,7 @@ public:
|
|||
auto* research = res.has_value() ? res->research : nullptr;
|
||||
if (!inventionListWindow->IsResearchItemSelected(research))
|
||||
{
|
||||
inventionListWindow->SetSelectedResearchItem(research);
|
||||
inventionListWindow->Invalidate();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue