diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/animation_editor.cpp | 6 | ||||
-rw-r--r-- | tools/editor/editor_node.cpp | 8 | ||||
-rw-r--r-- | tools/editor/plugins/script_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | tools/editor/project_settings.cpp | 5 | ||||
-rw-r--r-- | tools/editor/property_editor.cpp | 5 | ||||
-rw-r--r-- | tools/editor/property_editor.h | 1 | ||||
-rw-r--r-- | tools/editor/scenes_dock.cpp | 2 |
7 files changed, 26 insertions, 7 deletions
diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp index bf17b40f46..9a0dde783b 100644 --- a/tools/editor/animation_editor.cpp +++ b/tools/editor/animation_editor.cpp @@ -1702,7 +1702,7 @@ bool AnimationKeyEditor::_edit_if_single_selection() { if (selection.size()==0) { curve_edit->set_mode(AnimationCurveEdit::MODE_DISABLED); - print_line("disable"); + //print_line("disable"); } else { curve_edit->set_mode(AnimationCurveEdit::MODE_MULTIPLE); @@ -1713,13 +1713,13 @@ bool AnimationKeyEditor::_edit_if_single_selection() { curve_edit->set_multiple(animation->track_get_key_transition(E->key().track,E->key().key)); } - print_line("multiple"); + //print_line("multiple"); } return false; } curve_edit->set_mode(AnimationCurveEdit::MODE_SINGLE); - print_line("regular"); + //print_line("regular"); int idx = selection.front()->key().track; int key = selection.front()->key().key; diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 7dd0979452..d7708fcefd 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -520,7 +520,7 @@ void EditorNode::save_resource_as(const Ref<Resource>& p_resource) { List<String> preferred; for(int i=0;i<extensions.size();i++) { - if (p_resource->is_type("Script") && extensions[i]=="tres" || extensions[i]=="res" || extensions[i]=="xml") { + if (p_resource->is_type("Script") && (extensions[i]=="tres" || extensions[i]=="res" || extensions[i]=="xml")) { //this serves no purpose and confused people continue; } @@ -4723,11 +4723,13 @@ void EditorNode::_scene_tab_changed(int p_tab) { editor_data.get_undo_redo().add_do_method(this,"set_current_version",unsaved?saved_version:0); editor_data.get_undo_redo().add_do_method(this,"set_current_scene",p_tab); editor_data.get_undo_redo().add_do_method(scene_tabs,"set_current_tab",p_tab); + editor_data.get_undo_redo().add_do_method(scene_tabs,"ensure_tab_visible",p_tab); editor_data.get_undo_redo().add_do_method(this,"set_current_version",next_scene_version==0?editor_data.get_undo_redo().get_version()+1:next_scene_version); editor_data.get_undo_redo().add_undo_method(this,"set_current_version",next_scene_version); editor_data.get_undo_redo().add_undo_method(this,"set_current_scene",editor_data.get_edited_scene()); editor_data.get_undo_redo().add_undo_method(scene_tabs,"set_current_tab",editor_data.get_edited_scene()); + editor_data.get_undo_redo().add_undo_method(scene_tabs,"ensure_tab_visible",p_tab,editor_data.get_edited_scene()); editor_data.get_undo_redo().add_undo_method(this,"set_current_version",saved_version); editor_data.get_undo_redo().commit_action(); @@ -5195,7 +5197,11 @@ EditorNode::EditorNode() { p->add_separator(); p->add_item("Revert Scene",EDIT_REVERT); p->add_separator(); +#ifdef OSX_ENABLED p->add_item("Quit to Project List",RUN_PROJECT_MANAGER,KEY_MASK_SHIFT+KEY_MASK_ALT+KEY_Q); +#else + p->add_item("Quit to Project List",RUN_PROJECT_MANAGER,KEY_MASK_SHIFT+KEY_MASK_CTRL+KEY_Q); +#endif p->add_item("Quit",FILE_QUIT,KEY_MASK_CMD+KEY_Q); recent_scenes = memnew( PopupMenu ); diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 6c36c71e93..fc0d68b2f8 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -327,7 +327,11 @@ void ScriptTextEditor::_load_theme_settings() { for(List<StringName>::Element *E=types.front();E;E=E->next()) { - get_text_edit()->add_keyword_color(E->get(),type_color); + String n = E->get(); + if (n.begins_with("_")) + n = n.substr(1, n.length()); + + get_text_edit()->add_keyword_color(n,type_color); } //colorize comments diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp index b61fcfa780..6c5e18ec9a 100644 --- a/tools/editor/project_settings.cpp +++ b/tools/editor/project_settings.cpp @@ -530,7 +530,7 @@ void ProjectSettings::_item_selected() { return; if (!ti->get_parent()) return; - category->set_text(ti->get_parent()->get_text(0)); + category->set_text(globals_editor->get_current_section()); property->set_text(ti->get_text(0)); popup_platform->set_disabled(false); @@ -569,7 +569,8 @@ void ProjectSettings::_item_add() { String name = catname+"/"+propname; Globals::get_singleton()->set(name,value); - globals_editor->get_property_editor()->update_tree(); + globals_editor->edit(NULL); + globals_editor->edit(Globals::get_singleton()); } void ProjectSettings::_item_del() { diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp index 0d9ef966d2..9743dc7202 100644 --- a/tools/editor/property_editor.cpp +++ b/tools/editor/property_editor.cpp @@ -3822,6 +3822,11 @@ void SectionedPropertyEditor::_section_selected(int p_which) { filter->set_section( sections->get_item_metadata(p_which) ); } +String SectionedPropertyEditor::get_current_section() const { + + return sections->get_item_metadata( sections->get_current() ); +} + String SectionedPropertyEditor::get_full_item_path(const String& p_item) { String base = sections->get_item_metadata( sections->get_current() ); diff --git a/tools/editor/property_editor.h b/tools/editor/property_editor.h index 4f03c0381f..63ad090901 100644 --- a/tools/editor/property_editor.h +++ b/tools/editor/property_editor.h @@ -270,6 +270,7 @@ public: PropertyEditor *get_property_editor(); void edit(Object* p_object); String get_full_item_path(const String& p_item); + String get_current_section() const; SectionedPropertyEditor(); ~SectionedPropertyEditor(); diff --git a/tools/editor/scenes_dock.cpp b/tools/editor/scenes_dock.cpp index cdc0bf0d25..5abc4992df 100644 --- a/tools/editor/scenes_dock.cpp +++ b/tools/editor/scenes_dock.cpp @@ -1254,6 +1254,8 @@ ScenesDock::ScenesDock(EditorNode *p_editor) { history_pos=0; tree_mode=true; + path="res://"; + } |