summaryrefslogtreecommitdiff
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 1b29b6fd93..3431930b8b 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -2458,10 +2458,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
settings_config_dialog->popup_edit_settings();
} break;
- case SETTINGS_USER_DATA_FOLDER: {
-
- OS::get_singleton()->shell_open(String("file://") + OS::get_singleton()->get_user_data_dir());
- } break;
case SETTINGS_EDITOR_DATA_FOLDER: {
OS::get_singleton()->shell_open(String("file://") + EditorSettings::get_singleton()->get_data_dir());
@@ -3717,6 +3713,11 @@ void EditorNode::show_warning(const String &p_text, const String &p_title) {
warning->popup_centered_minsize();
}
+void EditorNode::_copy_warning(const String &p_str) {
+
+ OS::get_singleton()->set_clipboard(warning->get_text());
+}
+
void EditorNode::_dock_select_input(const Ref<InputEvent> &p_input) {
Ref<InputEventMouse> me = p_input;
@@ -4971,18 +4972,18 @@ void EditorNode::dim_editor(bool p_dimming) {
static int dim_count = 0;
bool dim_ui = EditorSettings::get_singleton()->get("interface/editor/dim_editor_on_dialog_popup");
if (p_dimming) {
- if (dim_ui) {
- if (dim_count == 0) {
- _start_dimming(true);
- }
- dim_count++;
+ if (dim_ui && dim_count == 0) {
+ _start_dimming(true);
}
+ dim_count++;
} else {
if (dim_count == 1) {
_start_dimming(false);
- dim_count = 0;
- } else if (dim_ui && dim_count > 0) {
+ }
+ if (dim_count > 0) {
dim_count--;
+ } else {
+ ERR_PRINT("Undimmed before dimming!");
}
}
}
@@ -5196,6 +5197,8 @@ void EditorNode::_bind_methods() {
ClassDB::bind_method(D_METHOD("_inherit_imported"), &EditorNode::_inherit_imported);
ClassDB::bind_method(D_METHOD("_dim_timeout"), &EditorNode::_dim_timeout);
+ ClassDB::bind_method("_copy_warning", &EditorNode::_copy_warning);
+
ClassDB::bind_method(D_METHOD("_resources_reimported"), &EditorNode::_resources_reimported);
ClassDB::bind_method(D_METHOD("_bottom_panel_raise_toggled"), &EditorNode::_bottom_panel_raise_toggled);
@@ -5797,7 +5800,9 @@ EditorNode::EditorNode() {
feature_profile_manager->connect("current_feature_profile_changed", this, "_feature_profile_changed");
warning = memnew(AcceptDialog);
+ warning->add_button(TTR("Copy Text"), true, "copy");
gui_base->add_child(warning);
+ warning->connect("custom_action", this, "_copy_warning");
ED_SHORTCUT("editor/next_tab", TTR("Next tab"), KEY_MASK_CMD + KEY_TAB);
ED_SHORTCUT("editor/prev_tab", TTR("Previous tab"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_TAB);
@@ -5955,7 +5960,6 @@ EditorNode::EditorNode() {
#endif
p->add_separator();
- p->add_item(TTR("Open User Data Folder"), SETTINGS_USER_DATA_FOLDER);
if (OS::get_singleton()->get_data_path() == OS::get_singleton()->get_config_path()) {
// Configuration and data folders are located in the same place (Windows/macOS)
p->add_item(TTR("Open Editor Data/Settings Folder"), SETTINGS_EDITOR_DATA_FOLDER);