From 0aacb09ca2eed6dad36d9989ebbd54c851a1003e Mon Sep 17 00:00:00 2001 From: Bryce Yancey Date: Fri, 4 Sep 2020 23:04:54 -0600 Subject: [PATCH] Fix Issue List update on Layer Preview Select When selecting issues using SHIFT in the layer preview, the selected issue doesn't update in the issue list until after shift is released. This fix forces an immediate refresh of the issue list so that it updates as you click, rather than after SHIFT is released. Also fixed some commented code for for clearing crosshairs before zoom so that it compiles when uncommented...but code is still commented out in the commit. --- UVtools.GUI/FrmMain.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/UVtools.GUI/FrmMain.cs b/UVtools.GUI/FrmMain.cs index ea74593..4de1954 100644 --- a/UVtools.GUI/FrmMain.cs +++ b/UVtools.GUI/FrmMain.cs @@ -3414,7 +3414,7 @@ namespace UVtools.GUI // Not needed? visual artifact is not severe to make an extra showlayer call, also it acts like an "animation" removing crosshairs after zoom /*if (tsLayerImageShowCrosshairs.Checked && !ReferenceEquals(Issues, null) && flvIssues.SelectedIndices.Count > 0 && - pbLayer.Zoom <= CrosshairFadeLevel && AutoZoomLevel > CrosshairFadeLevel && + pbLayer.Zoom <= CrosshairFadeLevel && LockedZoomLevel > CrosshairFadeLevel && flvIssues.SelectedObjects.Cast().Any(issue => // Find a valid candidate to update layer preview, otherwise quit issue.LayerIndex == ActualLayer && issue.Type != LayerIssue.IssueType.EmptyLayer && issue.Type != LayerIssue.IssueType.TouchingBound)) { @@ -4071,7 +4071,7 @@ namespace UVtools.GUI { // Check to see if this zoom action will cross the crosshair fade threshold /*if (tsLayerImageShowCrosshairs.Checked && !ReferenceEquals(Issues, null) && flvIssues.SelectedIndices.Count > 0 - && pbLayer.Zoom <= CrosshairFadeLevel && AutoZoomLevel > CrosshairFadeLevel) + && pbLayer.Zoom <= CrosshairFadeLevel && LockedZoomLevel > CrosshairFadeLevel) { // Refresh the preview without the crosshairs before zooming-in. // Prevents zoomed-in crosshairs from breifly being displayed before @@ -4145,6 +4145,7 @@ namespace UVtools.GUI flvIssues.SelectedIndex = index; flvIssues.EnsureVisible(index); + flvIssues.Refresh(); break; }