diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_help_search.cpp | 6 | ||||
-rw-r--r-- | editor/editor_help_search.h | 1 | ||||
-rw-r--r-- | editor/editor_node.cpp | 2 | ||||
-rw-r--r-- | editor/editor_profiler.cpp | 3 | ||||
-rw-r--r-- | editor/import/editor_scene_importer_gltf.cpp | 3 | ||||
-rw-r--r-- | editor/plugins/animation_blend_space_1d_editor.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/editor_preview_plugins.cpp | 18 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 37 |
8 files changed, 47 insertions, 27 deletions
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp index 27e61362ed..517a1c34d1 100644 --- a/editor/editor_help_search.cpp +++ b/editor/editor_help_search.cpp @@ -170,7 +170,11 @@ void EditorHelpSearch::popup_dialog(const String &p_term) { if (p_term == "") { search_box->clear(); } else { - old_search = true; + if (old_term == p_term) + old_search = true; + else + old_term = p_term; + search_box->set_text(p_term); search_box->select_all(); } diff --git a/editor/editor_help_search.h b/editor/editor_help_search.h index 12ffd024a7..0be2f3419b 100644 --- a/editor/editor_help_search.h +++ b/editor/editor_help_search.h @@ -59,6 +59,7 @@ class EditorHelpSearch : public ConfirmationDialog { OptionButton *filter_combo; Tree *results_tree; bool old_search; + String old_term; class Runner; Ref<Runner> search; diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index ef382c0a19..ab41019ac3 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -6121,7 +6121,7 @@ EditorNode::EditorNode() { p = debug_menu->get_popup(); p->set_hide_on_window_lose_focus(true); - p->set_hide_on_item_selection(false); + p->set_hide_on_checkable_item_selection(false); p->add_check_shortcut(ED_SHORTCUT("editor/deploy_with_remote_debug", TTR("Deploy with Remote Debug")), RUN_DEPLOY_REMOTE_DEBUG); p->set_item_tooltip(p->get_item_count() - 1, TTR("When exporting or deploying, the resulting executable will attempt to connect to the IP of this computer in order to be debugged.")); p->add_check_shortcut(ED_SHORTCUT("editor/small_deploy_with_network_fs", TTR("Small Deploy with Network FS")), RUN_FILE_SERVER); diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp index 471742948f..020cb3bada 100644 --- a/editor/editor_profiler.cpp +++ b/editor/editor_profiler.cpp @@ -88,14 +88,13 @@ void EditorProfiler::clear() { frame_metrics.resize(metric_size); last_metric = -1; variables->clear(); - //activate->set_pressed(false); plot_sigs.clear(); plot_sigs.insert("physics_frame_time"); plot_sigs.insert("category_frame_time"); updating_frame = true; cursor_metric_edit->set_min(0); - cursor_metric_edit->set_max(0); + cursor_metric_edit->set_max(100); // Doesn't make much sense, but we can't have min == max. Doesn't hurt. cursor_metric_edit->set_value(0); updating_frame = false; hover_metric = -1; diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index a10d27f7cd..be066e15a5 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -2143,7 +2143,6 @@ Error EditorSceneImporterGLTF::_create_skeletons(GLTFState &state) { skeleton->add_bone(node->name); skeleton->set_bone_rest(bone_index, node->xform); - skeleton->set_bone_pose(bone_index, node->xform); if (node->parent >= 0 && state.nodes[node->parent]->skeleton == skel_i) { const int bone_parent = skeleton->find_bone(state.nodes[node->parent]->name); @@ -2324,7 +2323,7 @@ Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) { Array samplers = d["samplers"]; if (d.has("name")) { - animation.name = d["name"]; + animation.name = _sanitize_scene_name(d["name"]); } for (int j = 0; j < channels.size(); j++) { diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp index e07f041eb1..475e4c8d67 100644 --- a/editor/plugins/animation_blend_space_1d_editor.cpp +++ b/editor/plugins/animation_blend_space_1d_editor.cpp @@ -702,13 +702,13 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() { bottom_hb->set_h_size_flags(SIZE_EXPAND_FILL); min_value = memnew(SpinBox); - min_value->set_max(0); min_value->set_min(-10000); + min_value->set_max(0); min_value->set_step(0.01); max_value = memnew(SpinBox); - max_value->set_max(10000); max_value->set_min(0.01); + max_value->set_max(10000); max_value->set_step(0.01); label_value = memnew(LineEdit); diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 007ce58bd7..204562ac38 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -827,19 +827,23 @@ void EditorFontPreviewPlugin::_bind_methods() { bool EditorFontPreviewPlugin::handles(const String &p_type) const { - return ClassDB::is_parent_class(p_type, "DynamicFontData"); + return ClassDB::is_parent_class(p_type, "DynamicFontData") || ClassDB::is_parent_class(p_type, "DynamicFont"); } Ref<Texture> EditorFontPreviewPlugin::generate_from_path(const String &p_path, const Size2 &p_size) const { - Ref<DynamicFontData> SampledFont; - SampledFont.instance(); - SampledFont->set_font_path(p_path); - + RES res = ResourceLoader::load(p_path); Ref<DynamicFont> sampled_font; - sampled_font.instance(); + if (res->is_class("DynamicFont")) { + sampled_font = res->duplicate(); + if (sampled_font->get_outline_color() == Color(1, 1, 1, 1)) { + sampled_font->set_outline_color(Color(0, 0, 0, 1)); + } + } else if (res->is_class("DynamicFontData")) { + sampled_font.instance(); + sampled_font->set_font_data(res); + } sampled_font->set_size(50); - sampled_font->set_font_data(SampledFont); String sampled_text = "Abg"; Vector2 size = sampled_font->get_string_size(sampled_text); diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index f7e997a269..54bf8ce5a2 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -2497,7 +2497,10 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(node); EditorHelp *eh = Object::cast_to<EditorHelp>(node); if (se || eh) { - int new_index = script_list->get_item_metadata(script_list->get_item_at_position(p_point)); + int new_index = 0; + if (script_list->get_item_count() > 0) { + new_index = script_list->get_item_metadata(script_list->get_item_at_position(p_point)); + } tab_container->move_child(node, new_index); tab_container->set_current_tab(new_index); _update_script_names(); @@ -2514,7 +2517,10 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(node); EditorHelp *eh = Object::cast_to<EditorHelp>(node); if (se || eh) { - int new_index = script_list->get_item_metadata(script_list->get_item_at_position(p_point)); + int new_index = 0; + if (script_list->get_item_count() > 0) { + new_index = script_list->get_item_metadata(script_list->get_item_at_position(p_point)); + } tab_container->move_child(node, new_index); tab_container->set_current_tab(new_index); _update_script_names(); @@ -2525,7 +2531,10 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co Vector<String> files = d["files"]; - int new_index = script_list->get_item_metadata(script_list->get_item_at_position(p_point)); + int new_index = 0; + if (script_list->get_item_count() > 0) { + new_index = script_list->get_item_metadata(script_list->get_item_at_position(p_point)); + } int num_tabs_before = tab_container->get_child_count(); for (int i = 0; i < files.size(); i++) { String file = files[i]; @@ -2551,16 +2560,20 @@ void ScriptEditor::_unhandled_input(const Ref<InputEvent> &p_event) { if (!is_visible_in_tree() || !p_event->is_pressed() || p_event->is_echo()) return; if (ED_IS_SHORTCUT("script_editor/next_script", p_event)) { - int next_tab = script_list->get_current() + 1; - next_tab %= script_list->get_item_count(); - _go_to_tab(script_list->get_item_metadata(next_tab)); - _update_script_names(); + if (script_list->get_item_count() > 1) { + int next_tab = script_list->get_current() + 1; + next_tab %= script_list->get_item_count(); + _go_to_tab(script_list->get_item_metadata(next_tab)); + _update_script_names(); + } } if (ED_IS_SHORTCUT("script_editor/prev_script", p_event)) { - int next_tab = script_list->get_current() - 1; - next_tab = next_tab >= 0 ? next_tab : script_list->get_item_count() - 1; - _go_to_tab(script_list->get_item_metadata(next_tab)); - _update_script_names(); + if (script_list->get_item_count() > 1) { + int next_tab = script_list->get_current() - 1; + next_tab = next_tab >= 0 ? next_tab : script_list->get_item_count() - 1; + _go_to_tab(script_list->get_item_metadata(next_tab)); + _update_script_names(); + } } if (ED_IS_SHORTCUT("script_editor/window_move_up", p_event)) { _menu_option(WINDOW_MOVE_UP); @@ -3238,7 +3251,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { ED_SHORTCUT("script_editor/window_move_up", TTR("Move Up"), KEY_MASK_SHIFT | KEY_MASK_ALT | KEY_UP); ED_SHORTCUT("script_editor/window_move_down", TTR("Move Down"), KEY_MASK_SHIFT | KEY_MASK_ALT | KEY_DOWN); ED_SHORTCUT("script_editor/next_script", TTR("Next script"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_PERIOD); // these should be KEY_GREATER and KEY_LESS but those don't work - ED_SHORTCUT("script_editor/prev_script", TTR("Previous script"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_COLON); + ED_SHORTCUT("script_editor/prev_script", TTR("Previous script"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_COMMA); set_process_unhandled_input(true); file_menu = memnew(MenuButton); |