diff options
Diffstat (limited to 'UVtools.Core/Managers/ClipboardManager.cs')
-rw-r--r-- | UVtools.Core/Managers/ClipboardManager.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/UVtools.Core/Managers/ClipboardManager.cs b/UVtools.Core/Managers/ClipboardManager.cs index 07a363f..7c5de4b 100644 --- a/UVtools.Core/Managers/ClipboardManager.cs +++ b/UVtools.Core/Managers/ClipboardManager.cs @@ -275,11 +275,11 @@ namespace UVtools.Core.Managers /// <param name="slicerFile"></param> public void Init(FileFormat slicerFile) { + Clear(); + SlicerFile = slicerFile; + if (slicerFile is null || slicerFile.DecodeType == FileFormat.FileDecodeType.Partial) return; SuppressRestoreWork(() => { - Clear(); - SlicerFile = slicerFile; - if (slicerFile is null) return; var clip = new ClipboardItem(SlicerFile, "Original layers", true); clip.AddRange(SlicerFile.LayerManager.CloneLayers()); Add(clip); |