diff options
Diffstat (limited to 'UVtools.Core/FileFormats/ZCodexFile.cs')
-rw-r--r-- | UVtools.Core/FileFormats/ZCodexFile.cs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/UVtools.Core/FileFormats/ZCodexFile.cs b/UVtools.Core/FileFormats/ZCodexFile.cs index f29b907..6a366df 100644 --- a/UVtools.Core/FileFormats/ZCodexFile.cs +++ b/UVtools.Core/FileFormats/ZCodexFile.cs @@ -333,20 +333,25 @@ namespace UVtools.Core.FileFormats public override float MaterialMilliliters { - get => ResinMetadataSettings.TotalMaterialVolumeUsed; + get + { + var materialMl = base.MaterialMilliliters; + return materialMl > 0 ? materialMl : ResinMetadataSettings.TotalMaterialVolumeUsed; + } set { - UserSettings.MaterialVolume = ResinMetadataSettings.TotalMaterialVolumeUsed = (float) Math.Round(value, 2); - RaisePropertyChanged(); + if (value <= 0) value = base.MaterialMilliliters; + ResinMetadataSettings.TotalMaterialVolumeUsed = (float)Math.Round(value, 3); + base.MaterialMilliliters = ResinMetadataSettings.TotalMaterialVolumeUsed; } } public override float MaterialGrams { - get => ResinMetadataSettings.TotalMaterialWeightUsed; + get => (float) Math.Round(ResinMetadataSettings.TotalMaterialWeightUsed, 3); set { - ResinMetadataSettings.TotalMaterialWeightUsed = (float) Math.Round(value, 2); + ResinMetadataSettings.TotalMaterialWeightUsed = (float) Math.Round(value, 3); RaisePropertyChanged(); } } |