Always bring the selected issue into view on the list

This commit is contained in:
Tiago Conceição
2021-09-18 03:20:58 +01:00
parent 52fb6b880a
commit 00b01140cc
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -393,6 +393,7 @@ namespace UVtools.WPF
set
{
if (!RaiseAndSetIfChanged(ref _issueSelectedIndex, value)) return;
IssuesGrid.ScrollIntoView(Issues[_issueSelectedIndex], null);
RaisePropertyChanged(nameof(IssueSelectedIndexStr));
RaisePropertyChanged(nameof(IssueCanGoPrevious));
RaisePropertyChanged(nameof(IssueCanGoNext));
+2 -2
View File
@@ -1684,7 +1684,7 @@ namespace UVtools.WPF
// If location clicked is within an issue, activate it.
for (var i = 0; i < Issues.Count; i++)
{
LayerIssue issue = Issues[i];
var issue = Issues[i];
if (issue.LayerIndex != ActualLayer) continue;
if (!GetTransposedIssueBounds(issue).Contains(location)) continue;
@@ -1885,7 +1885,7 @@ namespace UVtools.WPF
if ((e.KeyModifiers & KeyModifiers.Control) != 0)
{
Point realLocation = GetTransposedPoint(location);
var realLocation = GetTransposedPoint(location);
unsafe
{
var brightness = LayerCache.ImageSpan[LayerCache.Image.GetPixelPos(realLocation)];