fiexd missing class attribute ExtensionOfNativeClass #131

This commit is contained in:
monitor1394
2021-04-12 12:55:22 +08:00
parent 40a9b19a63
commit 5205c9a53f
4 changed files with 26 additions and 21 deletions

View File

@@ -107,21 +107,7 @@ namespace XCharts
protected override void Awake()
{
if (m_Theme == null)
{
m_Theme = ChartTheme.Default;
}
else
{
if (m_Theme.font == null)
{
m_Theme.font = XChartsSettings.font;
}
if (m_Theme.colorPalette.Count == 0)
{
m_Theme.ResetTheme();
}
}
CheckTheme();
base.Awake();
m_Series.AnimationReset();
m_Series.AnimationFadeIn();
@@ -213,12 +199,27 @@ namespace XCharts
protected virtual void CheckTheme()
{
if (m_Theme != null && m_CheckTheme != m_Theme.theme)
if (m_Theme == null)
{
m_CheckTheme = m_Theme.theme;
m_Theme.CopyTheme(m_CheckTheme);
SetAllComponentDirty();
OnThemeChanged();
m_Theme = ChartTheme.Default;
}
else
{
if (m_Theme.font == null)
{
m_Theme.font = XChartsSettings.font;
}
if (m_Theme.colorPalette.Count == 0)
{
m_Theme.ResetTheme();
}
if (m_CheckTheme != m_Theme.theme)
{
m_CheckTheme = m_Theme.theme;
m_Theme.CopyTheme(m_CheckTheme);
SetAllComponentDirty();
OnThemeChanged();
}
}
}
protected override void CheckComponent()