summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-08-24 13:50:22 +0200
committerGitHub <noreply@github.com>2018-08-24 13:50:22 +0200
commit548c26239907c34081a96bff61d653f2a32ac243 (patch)
tree92d99a6e786092cd64a3cab949df38b765173043
parent0161e95f01a6a9c096eec75328e4f19c23cf5c25 (diff)
parent92a9a8969dc97cd6b4028f8164c96316af23da10 (diff)
Merge pull request #21359 from dragmz/fix-plot-clear-when-stopped
Fix clear button not clearing plot when stopped
-rw-r--r--editor/editor_profiler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp
index 67700b59de..a8d30d9cbe 100644
--- a/editor/editor_profiler.cpp
+++ b/editor/editor_profiler.cpp
@@ -100,6 +100,8 @@ void EditorProfiler::clear() {
updating_frame = false;
hover_metric = -1;
seeking = false;
+
+ _update_plot();
}
static String _get_percent_txt(float p_value, float p_total) {
@@ -167,7 +169,7 @@ void EditorProfiler::_update_plot() {
int w = graph->get_size().width;
int h = graph->get_size().height;
- bool reset_texture = false;
+ bool reset_texture = graph_texture.is_null();
int desired_len = w * h * 4;