From ac7628ce68813903a7159deaabb0163aff3c4956 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Fri, 9 Sep 2022 13:19:22 +0800 Subject: [PATCH] [bug] fix editor auto refresh bug --- CHANGELOG.md | 3 ++- Runtime/Internal/BaseChart.API.cs | 5 +++++ Runtime/Internal/BaseGraph.API.cs | 2 +- Runtime/Internal/BaseGraph.cs | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a6fc189..1e6e135a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,7 +58,8 @@ ## master -* (2022.09.06) 增加`RingChart`可设置`LabelLine`引导线的支持 +* (2022.09.09) 修复`Editor`下编辑参数部分组件可能不会实时刷新的问题 +* (2022.09.08) 增加`RingChart`可设置`LabelLine`引导线的支持 * (2022.09.06) 增加`SerieSymbol`的`minSize`和`maxSize`参数设置最大最小尺寸的支持 * (2022.09.06) 增加`AxisSplitLine`的`showStartLine`和`showEndLine`参数设置是否显示首位分割线的支持 * (2022.09.06) 增加`Heatmap`通过`symbol`设置不同的图案的支持 diff --git a/Runtime/Internal/BaseChart.API.cs b/Runtime/Internal/BaseChart.API.cs index db3b70f9..765355c1 100644 --- a/Runtime/Internal/BaseChart.API.cs +++ b/Runtime/Internal/BaseChart.API.cs @@ -157,6 +157,11 @@ namespace XCharts.Runtime if (m_PainterTop) m_PainterTop.Refresh(); } + public override void RefreshGraph() + { + RefreshChart(); + } + /// /// Redraw chart serie in next frame. /// |在下一帧刷新图表的指定serie。 diff --git a/Runtime/Internal/BaseGraph.API.cs b/Runtime/Internal/BaseGraph.API.cs index a9290229..f2c9c945 100644 --- a/Runtime/Internal/BaseGraph.API.cs +++ b/Runtime/Internal/BaseGraph.API.cs @@ -120,7 +120,7 @@ namespace XCharts.Runtime /// Redraw graph in next frame. /// |在下一帧刷新图形。 /// - public void RefreshGraph() + public virtual void RefreshGraph() { m_RefreshChart = true; } diff --git a/Runtime/Internal/BaseGraph.cs b/Runtime/Internal/BaseGraph.cs index 28b212dc..f5e52e10 100644 --- a/Runtime/Internal/BaseGraph.cs +++ b/Runtime/Internal/BaseGraph.cs @@ -80,9 +80,9 @@ namespace XCharts.Runtime if (m_IsOnValidate) { m_IsOnValidate = false; - m_RefreshChart = true; CheckTextMeshPro(); InitComponent(); + RefreshGraph(); } else {