diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/dependency_editor.cpp | 2 | ||||
-rw-r--r-- | editor/editor_export.cpp | 16 | ||||
-rw-r--r-- | editor/export_template_manager.cpp | 2 | ||||
-rw-r--r-- | editor/filesystem_dock.cpp | 14 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 3 | ||||
-rw-r--r-- | editor/plugins/navigation_mesh_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/property_editor.cpp | 1 |
9 files changed, 29 insertions, 15 deletions
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index f18a966151..4e753cb342 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -514,7 +514,7 @@ void DependencyRemoveDialog::ok_pressed() { print_line("Moving to trash: " + path); Error err = OS::get_singleton()->move_to_trash(path); if (err != OK) { - EditorNode::get_singleton()->add_io_error(TTR("Cannot remove:\n") + to_delete[i] + "\n"); + EditorNode::get_singleton()->add_io_error(TTR("Cannot remove:") + "\n" + to_delete[i] + "\n"); } } diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp index 1a10040bac..e6a481eb01 100644 --- a/editor/editor_export.cpp +++ b/editor/editor_export.cpp @@ -1347,7 +1347,7 @@ Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_pr } if (template_path != String() && !FileAccess::exists(template_path)) { - EditorNode::get_singleton()->show_warning(TTR("Template file not found:\n") + template_path); + EditorNode::get_singleton()->show_warning(TTR("Template file not found:") + "\n" + template_path); return ERR_FILE_NOT_FOUND; } @@ -1361,7 +1361,19 @@ Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_pr String pck_path = p_path.get_basename() + ".pck"; - return save_pack(p_preset, pck_path); + Vector<SharedObject> so_files; + + err = save_pack(p_preset, pck_path, &so_files); + + if (err != OK || so_files.empty()) + return err; + //if shared object files, copy them + da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); + for (int i = 0; i < so_files.size(); i++) { + da->copy(so_files[i].path, p_path.get_base_dir().plus_file(so_files[i].path.get_file())); + } + memdelete(da); + return OK; } void EditorExportPlatformPC::set_extension(const String &p_extension, const String &p_feature_key) { diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index 0206e37c43..ccc9a52a3e 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -250,7 +250,7 @@ void ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_ DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); Error err = d->make_dir_recursive(template_path); if (err != OK) { - EditorNode::get_singleton()->show_warning(TTR("Error creating path for templates:\n") + template_path); + EditorNode::get_singleton()->show_warning(TTR("Error creating path for templates:") + "\n" + template_path); unzClose(pkg); return; } diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index b18cd6b747..e6bc19b571 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -752,7 +752,7 @@ void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_ return; } else if (!p_item.is_file && new_path.begins_with(old_path)) { //This check doesn't erroneously catch renaming to a longer name as folder paths always end with "/" - EditorNode::get_singleton()->add_io_error(TTR("Cannot move a folder into itself.\n") + old_path + "\n"); + EditorNode::get_singleton()->add_io_error(TTR("Cannot move a folder into itself.") + "\n" + old_path + "\n"); return; } @@ -772,7 +772,7 @@ void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_ if (p_item.is_file && FileAccess::exists(old_path + ".import")) { err = da->rename(old_path + ".import", new_path + ".import"); if (err != OK) { - EditorNode::get_singleton()->add_io_error(TTR("Error moving:\n") + old_path + ".import\n"); + EditorNode::get_singleton()->add_io_error(TTR("Error moving:") + "\n" + old_path + ".import\n"); } } @@ -796,7 +796,7 @@ void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_ print_line(" Remap: " + changed_paths[i] + " -> " + p_renames[changed_paths[i]]); } } else { - EditorNode::get_singleton()->add_io_error(TTR("Error moving:\n") + old_path + "\n"); + EditorNode::get_singleton()->add_io_error(TTR("Error moving:") + "\n" + old_path + "\n"); } memdelete(da); } @@ -813,7 +813,7 @@ void FileSystemDock::_try_duplicate_item(const FileOrFolder &p_item, const Strin return; } else if (!p_item.is_file && new_path.begins_with(old_path)) { //This check doesn't erroneously catch renaming to a longer name as folder paths always end with "/" - EditorNode::get_singleton()->add_io_error(TTR("Cannot move a folder into itself.\n") + old_path + "\n"); + EditorNode::get_singleton()->add_io_error(TTR("Cannot move a folder into itself.") + "\n" + old_path + "\n"); return; } @@ -825,11 +825,11 @@ void FileSystemDock::_try_duplicate_item(const FileOrFolder &p_item, const Strin if (p_item.is_file && FileAccess::exists(old_path + ".import")) { err = da->copy(old_path + ".import", new_path + ".import"); if (err != OK) { - EditorNode::get_singleton()->add_io_error(TTR("Error duplicating:\n") + old_path + ".import\n"); + EditorNode::get_singleton()->add_io_error(TTR("Error duplicating:") + "\n" + old_path + ".import\n"); } } } else { - EditorNode::get_singleton()->add_io_error(TTR("Error duplicating:\n") + old_path + "\n"); + EditorNode::get_singleton()->add_io_error(TTR("Error duplicating:") + "\n" + old_path + "\n"); } memdelete(da); } @@ -901,7 +901,7 @@ void FileSystemDock::_update_dependencies_after_move(const Map<String, String> & if (ResourceLoader::get_resource_type(file) == "PackedScene") editor->reload_scene(file); } else { - EditorNode::get_singleton()->add_io_error(TTR("Unable to update dependencies:\n") + remaps[i] + "\n"); + EditorNode::get_singleton()->add_io_error(TTR("Unable to update dependencies:") + "\n" + remaps[i] + "\n"); } } } diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index a52c914096..d116e30cfe 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -3990,6 +3990,7 @@ void CanvasItemEditor::_bind_methods() { ClassDB::bind_method("_snap_changed", &CanvasItemEditor::_snap_changed); ClassDB::bind_method(D_METHOD("_selection_result_pressed"), &CanvasItemEditor::_selection_result_pressed); ClassDB::bind_method(D_METHOD("_selection_menu_hide"), &CanvasItemEditor::_selection_menu_hide); + ClassDB::bind_method(D_METHOD("set_state"), &CanvasItemEditor::set_state); ADD_SIGNAL(MethodInfo("item_lock_status_changed")); ADD_SIGNAL(MethodInfo("item_group_status_changed")); @@ -4348,7 +4349,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { additive_selection = false; // Update the menus checkboxes - set_state(get_state()); + call_deferred("set_state", get_state()); } CanvasItemEditor *CanvasItemEditor::singleton = NULL; diff --git a/editor/plugins/navigation_mesh_editor_plugin.cpp b/editor/plugins/navigation_mesh_editor_plugin.cpp index 8c80225db6..933ab36886 100644 --- a/editor/plugins/navigation_mesh_editor_plugin.cpp +++ b/editor/plugins/navigation_mesh_editor_plugin.cpp @@ -107,7 +107,7 @@ NavigationMeshEditor::NavigationMeshEditor() { button_bake->set_text(TTR("Bake!")); button_bake->set_toggle_mode(true); button_reset = memnew(Button); - button_bake->set_tooltip(TTR("Bake the navigation mesh.\n")); + button_bake->set_tooltip(TTR("Bake the navigation mesh.") + "\n"); bake_info = memnew(Label); bake_hbox->add_child(button_bake); diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index f6aef52e8b..71f15a4421 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -4947,7 +4947,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { tool_button[TOOL_MODE_SELECT]->set_pressed(true); button_binds[0] = MENU_TOOL_SELECT; tool_button[TOOL_MODE_SELECT]->connect("pressed", this, "_menu_item_pressed", button_binds); - tool_button[TOOL_MODE_SELECT]->set_tooltip(TTR("Select Mode (Q)\n") + keycode_get_string(KEY_MASK_CMD) + TTR("Drag: Rotate\nAlt+Drag: Move\nAlt+RMB: Depth list selection")); + tool_button[TOOL_MODE_SELECT]->set_tooltip(TTR("Select Mode (Q)") + "\n" + keycode_get_string(KEY_MASK_CMD) + TTR("Drag: Rotate\nAlt+Drag: Move\nAlt+RMB: Depth list selection")); tool_button[TOOL_MODE_MOVE] = memnew(ToolButton); hbc_menu->add_child(tool_button[TOOL_MODE_MOVE]); diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index 50db80ba01..475cdf07ba 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -342,7 +342,7 @@ AutotileEditor::AutotileEditor(EditorNode *p_editor) { split->add_child(property_editor); helper = memnew(AutotileEditorHelper(this)); - property_editor->edit(helper); + property_editor->call_deferred("edit", helper); //Editor diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 1dcc5a3231..89dcae0038 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -4135,6 +4135,7 @@ void PropertyEditor::_bind_methods() { ClassDB::bind_method("_resource_preview_done", &PropertyEditor::_resource_preview_done); ClassDB::bind_method("refresh", &PropertyEditor::refresh); ClassDB::bind_method("_draw_transparency", &PropertyEditor::_draw_transparency); + ClassDB::bind_method("edit", &PropertyEditor::edit); ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &PropertyEditor::get_drag_data_fw); ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &PropertyEditor::can_drop_data_fw); |