Skip to content

Commit c05fcbd

Browse files
committed
fix: reset object to default value
1 parent 0cbde5a commit c05fcbd

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

WolvenKit.App/ViewModels/Shell/ChunkViewModel.cs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2674,26 +2674,13 @@ private void ResetObject()
26742674
RecalculateProperties(Data);
26752675
Parent.CalculateIsDefault();
26762676

2677-
// Notify for graph sync when object is reset to default
26782677
NotifyPropertyUpdateForGraphSync();
26792678
return;
26802679
}
26812680

2682-
// Create a proper default value based on the property type
2683-
try
2684-
{
2685-
Data = RedTypeFactory.CreateAndInitRedType(PropertyType);
2686-
}
2687-
catch (Exception ex)
2688-
{
2689-
_loggerService.Warning(
2690-
$"Could not create default value for type {PropertyType.Name}, falling back to RedDummy: {ex.Message}");
2691-
Data = new RedDummy();
2692-
}
2693-
2681+
Data = new RedDummy();
26942682
RecalculateProperties(Data);
26952683

2696-
// Notify for graph sync when object is reset
26972684
NotifyPropertyUpdateForGraphSync();
26982685
}
26992686

0 commit comments

Comments
 (0)