mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 14:24:33 +01:00
Fix #17544: Placement rule in Invention List window does not move
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user