mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-14 00:01:55 -04:00
fix(cutting-ui): restore canvas after panel layout and clamp splitter
This commit is contained in:
1 parent
4738a0390e
commit
6ed7ab7392
2 files changed
+6
-4
No files matched your search
@@ -169,15 +169,14 @@ internal sealed class CuttingInspectionPanel : UserControl
|
||||
{
|
||||
view.InspectionCloseRequested = null;
|
||||
if (ReferenceEquals(view.Plate, plate))
|
||||
{
|
||||
view.RestoreViewport(viewport);
|
||||
view.OverlapDisplay = overlapDisplay;
|
||||
}
|
||||
}
|
||||
var ownedScope = scope;
|
||||
ownedScope?.Dispose();
|
||||
scope = null;
|
||||
editor.FinishCuttingInspection(this);
|
||||
if (!view.IsDisposed && ReferenceEquals(view.Plate, plate))
|
||||
view.RestoreViewport(viewport);
|
||||
ownedScope?.ResumeHostClose();
|
||||
Dispose();
|
||||
}
|
||||
|
||||
@@ -325,7 +325,10 @@ namespace OpenNest.Forms
|
||||
content.Dock = DockStyle.Fill;
|
||||
sidePanel.Controls.Add(content);
|
||||
sidePanelTitle.Text = title;
|
||||
viewSplitContainer.SplitterDistance = viewSplitContainer.Width - width;
|
||||
var widest = System.Math.Max(viewSplitContainer.Panel1MinSize,
|
||||
viewSplitContainer.Width - viewSplitContainer.Panel2MinSize - viewSplitContainer.SplitterWidth);
|
||||
viewSplitContainer.SplitterDistance = System.Math.Clamp(viewSplitContainer.Width - width,
|
||||
viewSplitContainer.Panel1MinSize, widest);
|
||||
viewSplitContainer.Panel2Collapsed = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user