From 41b96d59ed13280bdcb4ad6badf8745360974055 Mon Sep 17 00:00:00 2001 From: aryan-11825114 Date: Sun, 6 Oct 2024 09:34:11 +0530 Subject: [PATCH] Disable cursor_metric_edit initially in VisualProfiler --- editor/debugger/editor_visual_profiler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/debugger/editor_visual_profiler.cpp b/editor/debugger/editor_visual_profiler.cpp index d4859fbe4d9..b96761d6e1a 100644 --- a/editor/debugger/editor_visual_profiler.cpp +++ b/editor/debugger/editor_visual_profiler.cpp @@ -69,6 +69,7 @@ void EditorVisualProfiler::add_frame_metric(const Metric &p_metric) { updating_frame = true; clear_button->set_disabled(false); + cursor_metric_edit->set_editable(true); cursor_metric_edit->set_max(frame_metrics[last_metric].frame_number); cursor_metric_edit->set_min(MAX(int64_t(frame_metrics[last_metric].frame_number) - frame_metrics.size(), 0)); @@ -106,6 +107,7 @@ void EditorVisualProfiler::clear() { graph_limit = 1000.0f / CLAMP(int(EDITOR_GET("debugger/profiler_target_fps")), 1, 1000); updating_frame = true; + cursor_metric_edit->set_editable(false); cursor_metric_edit->set_min(0); cursor_metric_edit->set_max(0); cursor_metric_edit->set_value(0); @@ -782,6 +784,7 @@ EditorVisualProfiler::EditorVisualProfiler() { cursor_metric_edit = memnew(SpinBox); cursor_metric_edit->set_h_size_flags(SIZE_FILL); + cursor_metric_edit->set_editable(false); hb->add_child(cursor_metric_edit); cursor_metric_edit->connect(SceneStringName(value_changed), callable_mp(this, &EditorVisualProfiler::_cursor_metric_changed));