mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-05-19 20:36:45 -04:00
Select the implementation without parameters
This commit is contained in:
committed by
Matt Stevens
parent
3f5d3adef8
commit
236b072202
@@ -159,7 +159,7 @@ public class GenericControlWidget : ControlObjectWidget
|
||||
string labelText = displayInfo.Name;
|
||||
|
||||
// If the type has a custom ToString(), use that instead of the type name.
|
||||
if ( type.GetMethod( "ToString" ).DeclaringType != typeof( object ) )
|
||||
if ( type.GetMethod( "ToString", Type.EmptyTypes ).DeclaringType != typeof( object ) )
|
||||
{
|
||||
labelText = value?.ToString() ?? labelText;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user