mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 11:17:53 +01:00
Fixed crash with big 'Space around zones' values (#6815)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
@@ -171,8 +172,8 @@ namespace FancyZonesEditor
|
||||
maxCol++;
|
||||
}
|
||||
|
||||
rect.Width = colInfo[maxCol].End - left;
|
||||
rect.Height = rowInfo[maxRow].End - top;
|
||||
rect.Width = Math.Max(0, colInfo[maxCol].End - left);
|
||||
rect.Height = Math.Max(0, rowInfo[maxRow].End - top);
|
||||
rect.StrokeThickness = 1;
|
||||
rect.Stroke = Brushes.DarkGray;
|
||||
rect.Fill = Brushes.LightGray;
|
||||
|
||||
Reference in New Issue
Block a user