diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_command_palette.cpp | 8 | ||||
-rw-r--r-- | editor/editor_quick_open.cpp | 10 | ||||
-rw-r--r-- | editor/editor_themes.cpp | 3 | ||||
-rw-r--r-- | editor/plugins/skeleton_3d_editor_plugin.cpp | 2 |
4 files changed, 19 insertions, 4 deletions
diff --git a/editor/editor_command_palette.cpp b/editor/editor_command_palette.cpp index 3f93fa1f41..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(); diff --git a/editor/editor_quick_open.cpp b/editor/editor_quick_open.cpp index 50429878f9..bb533b88d6 100644 --- a/editor/editor_quick_open.cpp +++ b/editor/editor_quick_open.cpp @@ -32,12 +32,20 @@ #include "core/os/keyboard.h" #include "editor/editor_node.h" +#include "editor/editor_scale.h" void EditorQuickOpen::popup_dialog(const String &p_base, bool p_enable_multi, bool p_dontclear) { base_type = p_base; allow_multi_select = p_enable_multi; search_options->set_select_mode(allow_multi_select ? Tree::SELECT_MULTI : Tree::SELECT_SINGLE); - 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(); + } EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->get_filesystem(); _build_search_cache(efsd); diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 692deb3beb..df28b2e6ab 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -240,7 +240,8 @@ static Ref<ImageTexture> editor_generate_icon(int p_index, float p_scale, float // with integer editor scales. const bool upsample = !Math::is_equal_approx(Math::round(p_scale), p_scale); ImageLoaderSVG img_loader; - img_loader.create_image_from_string(img, editor_icons_sources[p_index], p_scale, upsample, p_convert_colors); + Error err = img_loader.create_image_from_string(img, editor_icons_sources[p_index], p_scale, upsample, p_convert_colors); + ERR_FAIL_COND_V_MSG(err != OK, Ref<ImageTexture>(), "Failed generating icon, unsupported or invalid SVG data in editor theme."); if (p_saturation != 1.0) { img->adjust_bcs(1.0, 1.0, p_saturation); } diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp index fd6c9b761e..2a05f95321 100644 --- a/editor/plugins/skeleton_3d_editor_plugin.cpp +++ b/editor/plugins/skeleton_3d_editor_plugin.cpp @@ -1239,7 +1239,7 @@ int Skeleton3DGizmoPlugin::subgizmos_intersect_ray(const EditorNode3DGizmo *p_gi Skeleton3DEditor *se = Skeleton3DEditor::get_singleton(); - if (!se->is_edit_mode()) { + if (!se || !se->is_edit_mode()) { return -1; } |