From a5e04243dadb6bd235be2673320e9e1bb959e3c2 Mon Sep 17 00:00:00 2001 From: Jaex Date: Tue, 1 Mar 2016 14:05:26 +0200 Subject: [PATCH] If none of filters checked then return --- ShareX.HistoryLib/HistoryForm.cs | 5 ++ ShareX.HistoryLib/HistoryForm.resx | 58 +++++++++---------- .../RegionHelpers/AreaManager.cs | 2 +- 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/ShareX.HistoryLib/HistoryForm.cs b/ShareX.HistoryLib/HistoryForm.cs index 51723fbd5..73fdbdc05 100644 --- a/ShareX.HistoryLib/HistoryForm.cs +++ b/ShareX.HistoryLib/HistoryForm.cs @@ -119,6 +119,11 @@ private void ApplyFiltersAndAdd() private HistoryItem[] ApplyFilters(HistoryItem[] historyItems) { + if (!cbTypeFilter.Checked && !cbHostFilter.Checked && !cbFilenameFilter.Checked && !cbDateFilter.Checked) + { + return historyItems; + } + IEnumerable result = historyItems.AsEnumerable(); if (cbTypeFilter.Checked) diff --git a/ShareX.HistoryLib/HistoryForm.resx b/ShareX.HistoryLib/HistoryForm.resx index 53e10ab17..83886b2c9 100644 --- a/ShareX.HistoryLib/HistoryForm.resx +++ b/ShareX.HistoryLib/HistoryForm.resx @@ -153,30 +153,6 @@ 0, 0 - - - @Invariant - - 24 - - - Date - - - 115 - - - Filename - - - 170 - - - URL - @Invariant - - 230 - Fill @@ -223,7 +199,7 @@ 8, 8 - 410, 368 + 414, 368 1 @@ -241,7 +217,7 @@ 0 - Bottom, Left + Bottom, Left, Right NoControl @@ -364,13 +340,13 @@ 16, 152 - 90, 17 + 75, 17 10 - File type filter: + Type filter: cbTypeFilter @@ -604,7 +580,7 @@ 8, 384 - 328, 248 + 414, 250 2 @@ -663,6 +639,30 @@ 0 + + + @Invariant + + 24 + + + Date + + + 115 + + + Filename + + + 170 + + + URL + @Invariant + + 230 + True diff --git a/ShareX.ScreenCaptureLib/RegionHelpers/AreaManager.cs b/ShareX.ScreenCaptureLib/RegionHelpers/AreaManager.cs index 04a7de120..3a9a999f5 100644 --- a/ShareX.ScreenCaptureLib/RegionHelpers/AreaManager.cs +++ b/ShareX.ScreenCaptureLib/RegionHelpers/AreaManager.cs @@ -136,7 +136,7 @@ public AreaManager(RectangleRegion surface) RoundedRectangleRadius = 25; RoundedRectangleRadiusIncrement = 3; TriangleAngle = TriangleAngle.Top; - MinimumSize = 5; + MinimumSize = 3; surface.MouseDown += surface_MouseDown; surface.MouseUp += surface_MouseUp;