Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'UVtools.Core/FileFormats/ChituboxFile.cs')
-rw-r--r--UVtools.Core/FileFormats/ChituboxFile.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/UVtools.Core/FileFormats/ChituboxFile.cs b/UVtools.Core/FileFormats/ChituboxFile.cs
index d854ebb..9261a1d 100644
--- a/UVtools.Core/FileFormats/ChituboxFile.cs
+++ b/UVtools.Core/FileFormats/ChituboxFile.cs
@@ -1270,11 +1270,16 @@ namespace UVtools.Core.FileFormats
public override float MaterialMilliliters
{
- get => (float) Math.Round(PrintParametersSettings.VolumeMl, 2);
+ get
+ {
+ var materialMl = base.MaterialMilliliters;
+ return materialMl > 0 ? materialMl : PrintParametersSettings.VolumeMl;
+ }
set
{
- PrintParametersSettings.VolumeMl = (float) Math.Round(value, 2);
- RaisePropertyChanged();
+ if (value <= 0) value = base.MaterialMilliliters;
+ PrintParametersSettings.VolumeMl = (float) Math.Round(value, 3);
+ base.MaterialMilliliters = PrintParametersSettings.VolumeMl;
}
}
@@ -1283,17 +1288,17 @@ namespace UVtools.Core.FileFormats
get => PrintParametersSettings.WeightG;
set
{
- PrintParametersSettings.WeightG = (float)Math.Round(value, 2);
+ PrintParametersSettings.WeightG = (float)Math.Round(value, 3);
RaisePropertyChanged();
}
}
public override float MaterialCost
{
- get => (float) Math.Round(PrintParametersSettings.CostDollars, 2);
+ get => (float) Math.Round(PrintParametersSettings.CostDollars, 3);
set
{
- PrintParametersSettings.CostDollars = (float) Math.Round(value, 2);
+ PrintParametersSettings.CostDollars = (float) Math.Round(value, 3);
RaisePropertyChanged();
}
}