diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 18a678cd72..13d6bbb85c 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -27,6 +27,7 @@ - Fix: [#17535] Multiplayer desync when placing rides with scenery. - Fix: [#17541] Station style not correctly saved to TD6. - Fix: [#17542] Stalls will autorotate towards paths outside the park. +- Fix: [#17544, #17754] Visual glitches in Invention List window. - Fix: [#17553] Crash when moving invention list items to empty list. - Fix: [#17571] All researched tracked rides show up as new vehicles in .park scenarios. - Fix: [#17600] Notifications are not properly cleared when loading a park. diff --git a/src/openrct2-ui/windows/EditorInventionsList.cpp b/src/openrct2-ui/windows/EditorInventionsList.cpp index 4b4429dcfe..1be94fea55 100644 --- a/src/openrct2-ui/windows/EditorInventionsList.cpp +++ b/src/openrct2-ui/windows/EditorInventionsList.cpp @@ -414,7 +414,7 @@ public: const auto clipHeight = bkWidget.height() - 1; if (clip_drawpixelinfo(&clipDPI, &dpi, screenPos, clipWidth, clipHeight)) { - object->DrawPreview(&clipDPI, clipWidth, height); + object->DrawPreview(&clipDPI, clipWidth, clipHeight); } } @@ -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(); } }