Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3eea0fb

Browse files
logic correction
1 parent 16696c2 commit 3eea0fb

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎SharedProject/Impl/CoverageColorProvider.cs‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ private async Task UpdateColoursFromFontsAndColorsAsync()
8282
{
8383
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
8484
var success = fontAndColorStorage.OpenCategory(ref categoryWithCoverage, storeFlags);
85+
var usedFontsAndColors = false;
8586
if (success == VSConstants.S_OK)
8687
{
8788
// https://github.com/microsoft/vs-threading/issues/993
@@ -101,14 +102,21 @@ System.Windows.Media.Color GetColor(string displayName)
101102
CoverageTouchedArea = GetColor("Coverage Touched Area");
102103
CoverageNotTouchedArea = GetColor("Coverage Not Touched Area");
103104
CoveragePartiallyTouchedArea = GetColor("Coverage Partially Touched Area");
105+
usedFontsAndColors = true;
106+
104107
}catch(NotSupportedException)
105108
{
106109
logger.Log("No coverage settings available from Fonts and Colors");
107110
}
108111
}
109-
canUseFontsAndColours = false;
110-
UseDefaultColours();
112+
111113
fontAndColorStorage.CloseCategory();
114+
if (!usedFontsAndColors)
115+
{
116+
canUseFontsAndColours = false;
117+
UseDefaultColours();
118+
}
119+
112120
}
113121

114122
private System.Windows.Media.Color ParseColor(uint color)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /