From 92a9a8969dc97cd6b4028f8164c96316af23da10 Mon Sep 17 00:00:00 2001 From: Marcin Zawiejski Date: Fri, 24 Aug 2018 12:41:25 +0200 Subject: Fix clear button not clearing plot when stopped Fixes the profiler Clear button that did not clear the profiler plot if the profiler was stopped. --- editor/editor_profiler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3