summaryrefslogtreecommitdiff
path: root/editor/editor_command_palette.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_command_palette.cpp')
-rw-r--r--editor/editor_command_palette.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/editor/editor_command_palette.cpp b/editor/editor_command_palette.cpp
index a0913265eb..b92b0fca59 100644
--- a/editor/editor_command_palette.cpp
+++ b/editor/editor_command_palette.cpp
@@ -171,7 +171,13 @@ void EditorCommandPalette::_confirmed() {
}
void EditorCommandPalette::open_popup() {
- popup_centered_clamped(Size2i(600, 440), 0.8f);
+ static bool was_showed = false;
+ if (!was_showed) {
+ was_showed = true;
+ popup_centered_clamped(Size2(600, 440) * EDSCALE, 0.8f);
+ } else {
+ show();
+ }
command_search_box->clear();
command_search_box->grab_focus();
@@ -226,7 +232,7 @@ void EditorCommandPalette::_add_command(String p_command_name, String p_key_name
void EditorCommandPalette::execute_command(String &p_command_key) {
ERR_FAIL_COND_MSG(!commands.has(p_command_key), p_command_key + " not found.");
commands[p_command_key].last_used = OS::get_singleton()->get_unix_time();
- commands[p_command_key].callable.call_deferredp(nullptr, 0);
+ commands[p_command_key].callable.call_deferred();
_save_history();
}