Skip to content

Commit

Permalink
Fixing mouse pointer not reverting back to original
Browse files Browse the repository at this point in the history
  • Loading branch information
martinchrzan committed May 15, 2021
1 parent fbcf77c commit 47101f6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ColorPicker/Mouse/CursorManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,27 @@ private static void ChangeCursor(string curFile, string cursorRegistryName)
}
catch (Exception ex)
{
Logger.LogError("Failed to change cursor", ex);
Logger.LogError("Failed to change cursor. CurFile: " + curFile + " cursor registry name: " + cursorRegistryName, ex);
}
}

private static void BackupOriginalCursors()
{
if (string.IsNullOrEmpty(_originalArrowCursorPath))
{
_originalArrowCursorPath = (string)Registry.GetValue(CursorsRegistryPath, ArrowRegistryName, string.Empty);
_originalArrowCursorPath = (string)Registry.GetValue(CursorsRegistryPath, ArrowRegistryName, string.Empty) ?? string.Empty;
}
if (string.IsNullOrEmpty(_originalIBeamCursorPath))
{
_originalIBeamCursorPath = (string)Registry.GetValue(CursorsRegistryPath, IBeamRegistryName, string.Empty);
_originalIBeamCursorPath = (string)Registry.GetValue(CursorsRegistryPath, IBeamRegistryName, string.Empty) ?? string.Empty;
}
if (string.IsNullOrEmpty(_originalCrosshairCursorPath))
{
_originalCrosshairCursorPath = (string)Registry.GetValue(CursorsRegistryPath, CrosshairRegistryName, string.Empty);
_originalCrosshairCursorPath = (string)Registry.GetValue(CursorsRegistryPath, CrosshairRegistryName, string.Empty) ?? string.Empty;
}
if (string.IsNullOrEmpty(_originalHandCursorPath))
{
_originalHandCursorPath = (string)Registry.GetValue(CursorsRegistryPath, HandRegistryName, string.Empty);
_originalHandCursorPath = (string)Registry.GetValue(CursorsRegistryPath, HandRegistryName, string.Empty) ?? string.Empty;
}
}

Expand Down

0 comments on commit 47101f6

Please sign in to comment.