mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-06 17:58:05 +02:00
Fix for Crash Caused by the Entity Spawn Menu (#1588)
This commit is contained in:
@@ -239,7 +239,7 @@ namespace Robust.Client.UserInterface.CustomControls
|
||||
|
||||
// Calculate index of first prototype to render based on current scroll.
|
||||
var height = MeasureButton.DesiredSize.Y + PrototypeListContainer.Separation;
|
||||
var offset = -PrototypeList.Position.Y;
|
||||
var offset = Math.Max(-PrototypeList.Position.Y, 0);
|
||||
var startIndex = (int) Math.Floor(offset / height);
|
||||
PrototypeList.ItemOffset = startIndex;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user