Skip to content

Commit

Permalink
Merge pull request #3572 from batzen/develop
Browse files Browse the repository at this point in the history
Improve check for RD "equality"
  • Loading branch information
punker76 authored Aug 11, 2019
2 parents 58da447 + c0c244a commit 87e7bb1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/MahApps.Metro/ThemeManager/ThemeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -913,8 +913,13 @@ private static bool AreResourceDictionarySourcesEqual(ResourceDictionary first,
return false;
}

if (first.Source.IsNull()
// If RD does not have a source, but both have keys and the first one has at least as many keys as the second,
// then compares their values.
if ((first.Source.IsNull()
|| second.Source.IsNull())
&& first.Keys.Count > 0
&& second.Keys.Count > 0
&& first.Keys.Count >= second.Keys.Count)
{
try
{
Expand Down

0 comments on commit 87e7bb1

Please sign in to comment.