Skip to content

Commit

Permalink
Merge pull request #3992 from timunie/ColorPicker_RecentColorsIssue
Browse files Browse the repository at this point in the history
Fix RecentColor - Issue
  • Loading branch information
punker76 committed Dec 4, 2020
2 parents dbb4fc2 + e5cde11 commit b683392
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ public static void AddColorToRecentColors(Color? color, IEnumerable recentColors
if (recentColors is ObservableCollection<Color?> collection)
{
var oldIndex = collection.IndexOf(color);
if (oldIndex > -1)
if (oldIndex > 0)
{
collection.Move(oldIndex, 0);
}
else
else if (oldIndex < 0)
{
if (collection.Count >= maxCount)
{
Expand Down

0 comments on commit b683392

Please sign in to comment.