aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-03-20 13:13:52 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-03-20 13:13:52 +0200
commit88ac356fd2d30e016bb884697e7b67f8ede51d2b (patch)
tree37566213026964e30229c21474f1bd148fe8e695
parent5881b11e25a34acc0230f5316db5783389afe18f (diff)
downloadTango-88ac356fd2d30e016bb884697e7b67f8ede51d2b.tar.gz
Tango-88ac356fd2d30e016bb884697e7b67f8ede51d2b.zip
Fixed issue with PPC "add job" button hiding the "delete job" button.
Removed message box on error in color lab module.
-rw-r--r--Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnkbin1344 -> 1516 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs10
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs4
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml4
-rw-r--r--Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs2
-rw-r--r--Software/Visual_Studio/Tango.BL/LiquidVolume.cs2
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs8
7 files changed, 19 insertions, 11 deletions
diff --git a/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk b/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk
index ed1da5b24..92c553e6e 100644
--- a/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk
+++ b/Software/Visual_Studio/Build/Shortcuts/Machine Studio.lnk
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs
index 97af89253..f01637b5b 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs
@@ -410,12 +410,12 @@ namespace Tango.MachineStudio.ColorLab.ViewModels
}
catch (Exception ex)
{
- LogManager.Log(ex, "Error in color conversion.");
+ LogManager.Log(ex, "An error occurred while trying to convert from source color to Volume.");
- InvokeUI(() =>
- {
- _notification.ShowError($"An error occurred while trying to convert from source color to Volume.\n" + ex.Message);
- });
+ //InvokeUI(() =>
+ //{
+ // _notification.ShowError($"An error occurred while trying to convert from source color to Volume.\n" + ex.Message);
+ //});
}
});
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs
index cc9202b30..aef6dd549 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs
@@ -607,7 +607,9 @@ namespace Tango.PPC.Jobs.ViewModels
private async void ExportJob()
{
- var selected_job = SelectedJobs.First();
+ var selected_job = SelectedJobs.FirstOrDefault();
+ if (selected_job == null) return;
+
ClearSelection();
var result = await NavigationManager.
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml
index 47a3df569..475437cf3 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobsView.xaml
@@ -59,6 +59,7 @@
<StackPanel.Style>
<Style TargetType="StackPanel">
<Setter Property="Opacity" Value="0"></Setter>
+ <Setter Property="IsHitTestVisible" Value="False"></Setter>
<Setter Property="RenderTransform">
<Setter.Value>
<TranslateTransform X="100" />
@@ -66,6 +67,7 @@
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsMultiSelecting}" Value="True">
+ <Setter Property="IsHitTestVisible" Value="True"></Setter>
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
@@ -119,6 +121,7 @@
<touch:TouchIconButton.Style>
<Style TargetType="touch:TouchIconButton" BasedOn="{StaticResource TangoRoundTouchIconButton}">
<Setter Property="Opacity" Value="1"></Setter>
+ <Setter Property="IsHitTestVisible" Value="True"></Setter>
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="1" ScaleY="1" />
@@ -126,6 +129,7 @@
</Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsMultiSelecting}" Value="True">
+ <Setter Property="IsHitTestVisible" Value="False"></Setter>
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
diff --git a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs
index bc4ab2786..aebc83f04 100644
--- a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs
+++ b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs
@@ -310,7 +310,7 @@ namespace Tango.BL.Entities
public void SetVolume(int packIndex, double volume)
{
- typeof(BrushStop).GetProperty("V" + packIndex).SetValue(this, volume);
+ typeof(BrushStop).GetProperty("V" + packIndex).SetValue(this, Math.Max(0, volume));
}
public void SetVolume(LiquidTypes liquidType, double volume)
diff --git a/Software/Visual_Studio/Tango.BL/LiquidVolume.cs b/Software/Visual_Studio/Tango.BL/LiquidVolume.cs
index 69142979e..69499905a 100644
--- a/Software/Visual_Studio/Tango.BL/LiquidVolume.cs
+++ b/Software/Visual_Studio/Tango.BL/LiquidVolume.cs
@@ -60,7 +60,7 @@ namespace Tango.BL
get { return _volume; }
set
{
- _volume = Math.Round(value, 2);
+ _volume = Math.Max(0, Math.Round(value, 2));
RaisePropertyChangedAuto();
OnVolumeChanged();
}
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index 4a2ecc9f0..9dab6cd65 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -1101,14 +1101,16 @@ namespace Tango.Integration.Operation
/// <returns></returns>
public Task<JobHandler> Print(Job job)
{
+ var jobSegments = job.OrderedSegments;
+
//Check not brush stop has color space 'Volume'.
- if (job.Segments.SelectMany(x => x.BrushStops).ToList().Exists(x => x.ColorSpace.Code == ColorSpaces.Volume.ToInt32()))
+ if (jobSegments.SelectMany(x => x.BrushStops).ToList().Exists(x => x.ColorSpace.Code == ColorSpaces.Volume.ToInt32()))
{
throw new InvalidOperationException("Cannot print a brush stop with volume color space when process parameters table has not been specified.");
}
//Get least common process parameters table index.
- int processParametersTableIndex = TangoColorConverter.GetLeastCommonProcessParametersTableIndex(job.Segments.SelectMany(x => x.BrushStops));
+ int processParametersTableIndex = TangoColorConverter.GetLeastCommonProcessParametersTableIndex(jobSegments.SelectMany(x => x.BrushStops));
if (job.Rml == null)
{
@@ -1130,7 +1132,7 @@ namespace Tango.Integration.Operation
}
//Perform color correction
- foreach (var stop in job.Segments.SelectMany(x => x.BrushStops))
+ foreach (var stop in jobSegments.SelectMany(x => x.BrushStops))
{
if (stop.LiquidVolumes == null)
{