mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 05:53:02 +01:00
Fix #13510: [Plugin] list view scroll resets when items is set.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
- Fix: [#13469] Exception thrown from plugin in context.subscribe.
|
||||
- Fix: [#13477] Plug-in widget tooltips do not work.
|
||||
- Fix: [#13489] Mechanics continue heading to inspect broken down rides.
|
||||
- Fix: [#13510] [Plugin] list view scroll resets when items is set.
|
||||
- Improved: [#12917] Changed peep movement so that they stay more spread out over the full width of single tile paths.
|
||||
- Removed: [#13423] Built-in explode guests cheat (replaced by plug-in).
|
||||
|
||||
|
||||
@@ -226,7 +226,8 @@ void CustomListView::SetScrollbars(ScrollbarType value, bool initialising)
|
||||
else
|
||||
widget->content = 0;
|
||||
}
|
||||
RefreshScroll();
|
||||
WindowInitScrollWidgets(ParentWindow);
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +244,8 @@ void CustomListView::SetColumns(const std::vector<ListViewColumn>& columns, bool
|
||||
SortItems(0, ColumnSortOrder::None);
|
||||
if (!initialising)
|
||||
{
|
||||
RefreshScroll();
|
||||
window_update_scroll_widgets(ParentWindow);
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,7 +272,8 @@ void CustomListView::SetItems(std::vector<ListViewItem>&& items, bool initialisi
|
||||
SortItems(0, ColumnSortOrder::None);
|
||||
if (!initialising)
|
||||
{
|
||||
RefreshScroll();
|
||||
window_update_scroll_widgets(ParentWindow);
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -726,12 +729,6 @@ std::optional<RowColumn> CustomListView::GetItemIndexAt(const ScreenCoordsXY& po
|
||||
return result;
|
||||
}
|
||||
|
||||
void CustomListView::RefreshScroll()
|
||||
{
|
||||
WindowInitScrollWidgets(ParentWindow);
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
rct_widget* CustomListView::GetWidget() const
|
||||
{
|
||||
size_t scrollIndex = 0;
|
||||
|
||||
@@ -145,7 +145,6 @@ namespace OpenRCT2::Ui::Windows
|
||||
rct_drawpixelinfo* dpi, const ScreenCoordsXY& pos, const ScreenSize& size, const char* text,
|
||||
bool isHighlighted) const;
|
||||
std::optional<RowColumn> GetItemIndexAt(const ScreenCoordsXY& pos);
|
||||
void RefreshScroll();
|
||||
rct_widget* GetWidget() const;
|
||||
void Invalidate();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user