summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-08-28 12:18:53 +0200
committerGitHub <noreply@github.com>2018-08-28 12:18:53 +0200
commit0dd162a936b558d2f231143164c734aeb6b72a10 (patch)
tree8c81a630bc24060f9c379c6aec64cc4a3d873388
parent6671096dd7a442b250a8d07a175db99ba02e6d5a (diff)
parenteaa0dbc7d83c3dc88953ce21adf1178de57ef01a (diff)
Merge pull request #21523 from dragmz/21521-fix
Fix for p_width - 1=-1 out of size
-rw-r--r--editor/editor_profiler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp
index f57c863bcf..223bb9df84 100644
--- a/editor/editor_profiler.cpp
+++ b/editor/editor_profiler.cpp
@@ -100,8 +100,6 @@ void EditorProfiler::clear() {
updating_frame = false;
hover_metric = -1;
seeking = false;
-
- _update_plot();
}
static String _get_percent_txt(float p_value, float p_total) {
@@ -169,7 +167,7 @@ void EditorProfiler::_update_plot() {
int w = graph->get_size().width;
int h = graph->get_size().height;
- bool reset_texture = graph_texture.is_null();
+ bool reset_texture = false;
int desired_len = w * h * 4;
@@ -437,6 +435,7 @@ void EditorProfiler::_activate_pressed() {
void EditorProfiler::_clear_pressed() {
clear();
+ _update_plot();
}
void EditorProfiler::_notification(int p_what) {