mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-08 17:42:31 +02:00
v3.5.4
- **PCB Exposure:** - (Add) Parse of deprecated commands (G70, G71, G90, G91) - (Fix) Able to have parameterless macro apertures (#503) - **UI:** - (Add) Menu -> File -> Free unused RAM: Force the garbage collection of all unused objects within the program to free unused memory (RAM). It's never required for the end user run this. The program will automatically take care of it when required. This function is for debug purposes. - (Improvement) Window title bar: Show elapsed minutes and seconds instead of total seconds minutes and second - (Fix) Tool - Mask: Loaded image resolution shows as (unloaded) - (Fix) Applying a large set of modifications in layer depth with pixel editor cause huge memory spike due layer aggregation without disposing, leading to program crash on most cases where RAM is insufficient (#506) - (Upgrade) AvaloniaUI from 0.10.15 to 0.10.16
This commit is contained in:
@@ -53,7 +53,7 @@ public class ToolMaskControl : ToolControl
|
||||
}
|
||||
|
||||
public string InfoPrinterResolutionStr => $"Printer resolution: {App.SlicerFile.Resolution}";
|
||||
public string InfoMaskResolutionStr => $"Mask resolution: "+ (Operation.HaveMask ? Operation.Mask.Size.ToString() : "(Unloaded)");
|
||||
public string InfoMaskResolutionStr => $"Mask resolution: "+ (Operation.HaveInputMask ? Operation.Mask.Size.ToString() : "(Unloaded)");
|
||||
|
||||
public Bitmap MaskImage
|
||||
{
|
||||
@@ -106,28 +106,7 @@ public class ToolMaskControl : ToolControl
|
||||
|
||||
try
|
||||
{
|
||||
Operation.Mask = CvInvoke.Imread(result[0], ImreadModes.Grayscale);
|
||||
var roi = App.MainWindow.ROI;
|
||||
if (roi.IsEmpty)
|
||||
{
|
||||
if (Operation.Mask.Size != App.SlicerFile.Resolution)
|
||||
{
|
||||
CvInvoke.Resize(Operation.Mask, Operation.Mask, App.SlicerFile.Resolution);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Operation.Mask.Size != roi.Size)
|
||||
{
|
||||
CvInvoke.Resize(Operation.Mask, Operation.Mask, roi.Size);
|
||||
}
|
||||
}
|
||||
|
||||
if (_isMaskInverted)
|
||||
{
|
||||
Operation.InvertMask();
|
||||
}
|
||||
|
||||
Operation.LoadFromFile(result[0], _isMaskInverted, App.MainWindow.ROI.Size.IsEmpty ? SlicerFile.Resolution : App.MainWindow.ROI.Size);
|
||||
MaskImage = Operation.Mask.ToBitmap();
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -164,8 +143,7 @@ public class ToolMaskControl : ToolControl
|
||||
CvInvoke.Circle(Operation.Mask, center, (int)i, new MCvScalar(color), 2);
|
||||
}
|
||||
|
||||
if (_isMaskInverted)
|
||||
Operation.InvertMask();
|
||||
if (_isMaskInverted) Operation.InvertMask();
|
||||
MaskImage = Operation.Mask.ToBitmap();
|
||||
}
|
||||
}
|
||||
@@ -115,13 +115,21 @@
|
||||
Items="{Binding MenuFileConvertItems}"
|
||||
i:MenuItem.Icon="fa-solid fa-exchange-alt"/>
|
||||
|
||||
<MenuItem Name="MainMenu.File.FreeUnusedRAM"
|
||||
Header="Free unused RAM"
|
||||
ToolTip.Tip="Force the garbage collection of all unused objects within the program to free unused memory (RAM).
|
||||

It's never required for the end user run this. The program will automatically take care of it when required.
|
||||

This function is for debug purposes."
|
||||
Command="{Binding OnMenuFileFreeUnusedRAM}"
|
||||
i:MenuItem.Icon="fa-solid fa-memory"/>
|
||||
|
||||
<Separator/>
|
||||
|
||||
<MenuItem Name="MainMenu.File.Fullscreen"
|
||||
Header="_Fullscreen"
|
||||
InputGesture="F11" HotKey="F11"
|
||||
Command="{Binding OnMenuFileFullscreen}"
|
||||
i:MenuItem.Icon="fa-solid fa-window-maximize"/>
|
||||
<MenuItem Name="MainMenu.File.Fullscreen"
|
||||
Header="_Fullscreen"
|
||||
InputGesture="F11" HotKey="F11"
|
||||
Command="{Binding OnMenuFileFullscreen}"
|
||||
i:MenuItem.Icon="fa-solid fa-window-maximize"/>
|
||||
|
||||
<MenuItem Name="MainMenu.File.Settings"
|
||||
Header="_Settings"
|
||||
|
||||
@@ -1069,6 +1069,12 @@ public partial class MainWindow : WindowEx
|
||||
ResetDataContext();
|
||||
}
|
||||
|
||||
public void OnMenuFileFreeUnusedRAM()
|
||||
{
|
||||
GC.Collect();
|
||||
GC.WaitForPendingFinalizers();
|
||||
}
|
||||
|
||||
public void OnMenuFileFullscreen()
|
||||
{
|
||||
WindowState = WindowState == WindowState.FullScreen ? WindowState.Maximized : WindowState.FullScreen;
|
||||
@@ -1233,7 +1239,7 @@ public partial class MainWindow : WindowEx
|
||||
|
||||
if (IsFileLoaded)
|
||||
{
|
||||
title += $"File: {SlicerFile.Filename} ({Math.Round(LastStopWatch.ElapsedMilliseconds / 1000m, 2)}s) ";
|
||||
title += $"File: {SlicerFile.Filename} ({LastStopWatch.Elapsed.Minutes}m {LastStopWatch.Elapsed.Seconds}s) ";
|
||||
}
|
||||
|
||||
title += $"Version: {About.VersionStr} RAM: {SizeExtensions.SizeSuffix(Environment.WorkingSet)}";
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
<RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl>
|
||||
<RepositoryType>Git</RepositoryType>
|
||||
<Version>3.5.3</Version>
|
||||
<Version>3.5.4</Version>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
<PackageIcon>UVtools.png</PackageIcon>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
@@ -39,10 +39,10 @@
|
||||
<NoWarn>1701;1702;</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="0.10.15" />
|
||||
<PackageReference Include="Avalonia.Controls.DataGrid" Version="0.10.15" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="0.10.15" />
|
||||
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.15" />
|
||||
<PackageReference Include="Avalonia" Version="0.10.16" />
|
||||
<PackageReference Include="Avalonia.Controls.DataGrid" Version="0.10.16" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="0.10.16" />
|
||||
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.16" />
|
||||
<PackageReference Include="MessageBox.Avalonia" Version="2.0.1" />
|
||||
<PackageReference Include="Projektanker.Icons.Avalonia" Version="5.1.0" />
|
||||
<PackageReference Include="Projektanker.Icons.Avalonia.FontAwesome" Version="5.1.0" />
|
||||
|
||||
Reference in New Issue
Block a user