summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/code_editor.cpp10
-rw-r--r--editor/editor_file_dialog.cpp1
-rw-r--r--editor/editor_properties.cpp2
-rw-r--r--editor/editor_themes.cpp3
-rw-r--r--editor/import_dock.cpp6
-rw-r--r--editor/plugins/script_editor_plugin.cpp2
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp1
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp11
-rw-r--r--editor/property_editor.cpp2
-rw-r--r--editor/scene_tree_dock.cpp6
10 files changed, 34 insertions, 10 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 157a9cdca7..77e20b971c 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -226,6 +226,10 @@ void FindReplaceBar::_replace_all() {
text_edit->begin_complex_operation();
+ if (selection_enabled && is_selection_only()) {
+ text_edit->cursor_set_line(selection_begin.width);
+ text_edit->cursor_set_column(selection_begin.height);
+ }
if (search_current()) {
do {
// replace area
@@ -243,7 +247,7 @@ void FindReplaceBar::_replace_all() {
if (selection_enabled && is_selection_only()) {
if (match_from < selection_begin || match_to > selection_end) {
- continue;
+ break; // Done.
}
// Replace but adjust selection bounds.
@@ -289,6 +293,10 @@ void FindReplaceBar::_get_search_from(int &r_line, int &r_col) {
r_line = text_edit->cursor_get_line();
r_col = text_edit->cursor_get_column();
+ if (text_edit->is_selection_active() && is_selection_only()) {
+ return;
+ }
+
if (r_line == result_line && r_col >= result_col && r_col <= result_col + get_search_text().length()) {
r_col = result_col;
}
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 71ade56e39..760bf572ef 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -1579,6 +1579,7 @@ EditorFileDialog::EditorFileDialog() {
drives = memnew(OptionButton);
drives->connect("item_selected", callable_mp(this, &EditorFileDialog::_select_drive));
+ pathhb->add_child(drives);
makedir = memnew(Button);
makedir->set_text(TTR("Create Folder"));
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 1f3ff1b332..cf478f20e5 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -2196,7 +2196,7 @@ void EditorPropertyResource::_menu_option(int p_which) {
file_system_dock->navigate_to_path(res->get_path());
// Ensure that the FileSystem dock is visible.
TabContainer *tab_container = (TabContainer *)file_system_dock->get_parent_control();
- tab_container->set_current_tab(file_system_dock->get_position_in_parent());
+ tab_container->set_current_tab(file_system_dock->get_index());
} break;
default: {
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 663068b2b5..a9af29ddf2 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -997,6 +997,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// LinkButton
theme->set_stylebox("focus", "LinkButton", style_empty);
theme->set_color("font_color", "LinkButton", font_color);
+ theme->set_color("font_color_hover", "LinkButton", font_color_hl);
+ theme->set_color("font_color_pressed", "LinkButton", accent_color);
+ theme->set_color("font_color_disabled", "LinkButton", font_color_disabled);
// TooltipPanel
Ref<StyleBoxFlat> style_tooltip = style_popup->duplicate();
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 23be42aaea..22f6aedeaa 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -450,8 +450,8 @@ void ImportDock::_reimport() {
String importer_name = params->importer->get_importer_name();
- if (params->checking) {
- //update only what edited (checkboxes)
+ if (params->checking && config->get_value("remap", "importer") == params->importer->get_importer_name()) {
+ //update only what is edited (checkboxes) if the importer is the same
for (List<PropertyInfo>::Element *E = params->properties.front(); E; E = E->next()) {
if (params->checked.has(E->get().name)) {
config->set_value("params", E->get().name, params->values[E->get().name]);
@@ -558,7 +558,7 @@ ImportDock::ImportDock() {
hb->add_spacer();
reimport_confirm = memnew(ConfirmationDialog);
- reimport_confirm->get_ok()->set_text(TTR("Save scenes, re-import and restart"));
+ reimport_confirm->get_ok()->set_text(TTR("Save Scenes, Re-Import, and Restart"));
add_child(reimport_confirm);
reimport_confirm->connect("confirmed", callable_mp(this, &ImportDock::_reimport_and_restart));
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index dd80fff008..0b97ade278 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1243,7 +1243,7 @@ void ScriptEditor::_menu_option(int p_option) {
file_system_dock->navigate_to_path(path);
// Ensure that the FileSystem dock is visible.
TabContainer *tab_container = (TabContainer *)file_system_dock->get_parent_control();
- tab_container->set_current_tab(file_system_dock->get_position_in_parent());
+ tab_container->set_current_tab(file_system_dock->get_index());
}
} break;
case CLOSE_DOCS: {
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index cd69c1e6f9..8892d13f51 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -1030,6 +1030,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode *p_editor) {
hscroll->connect("value_changed", callable_mp(this, &TextureRegionEditor::_scroll_changed));
updating_scroll = false;
+ autoslice_is_dirty = true;
}
void TextureRegionEditorPlugin::edit(Object *p_object) {
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index b1bd6392d8..294ce2c4cd 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -556,6 +556,17 @@ void VisualShaderEditor::_update_graph() {
uniform_name->connect("text_entered", callable_mp(this, &VisualShaderEditor::_line_edit_changed), varray(uniform_name, nodes[n_i]));
uniform_name->connect("focus_exited", callable_mp(this, &VisualShaderEditor::_line_edit_focus_out), varray(uniform_name, nodes[n_i]));
+ String error = vsnode->get_warning(visual_shader->get_mode(), type);
+ if (error != String()) {
+ offset = memnew(Control);
+ offset->set_custom_minimum_size(Size2(0, 4 * EDSCALE));
+ node->add_child(offset);
+ Label *error_label = memnew(Label);
+ error_label->add_theme_color_override("font_color", get_theme_color("error_color", "Editor"));
+ error_label->set_text(error);
+ node->add_child(error_label);
+ }
+
if (vsnode->get_input_port_count() == 0 && vsnode->get_output_port_count() == 1 && vsnode->get_output_port_name(0) == "") {
//shortcut
VisualShaderNode::PortType port_right = vsnode->get_output_port_type(0);
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 444cae42c5..978c95b9c8 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -257,7 +257,7 @@ void CustomPropertyEditor::_menu_option(int p_which) {
file_system_dock->navigate_to_path(r->get_path());
// Ensure that the FileSystem dock is visible.
TabContainer *tab_container = (TabContainer *)file_system_dock->get_parent_control();
- tab_container->set_current_tab(file_system_dock->get_position_in_parent());
+ tab_container->set_current_tab(file_system_dock->get_index());
} break;
default: {
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index eaefd04c6b..a729f62123 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -1535,7 +1535,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
if (p_nodes[ni] == p_new_parent)
return; // Attempt to reparent to itself.
- if (p_nodes[ni]->get_parent() != p_new_parent || p_position_in_parent + ni != p_nodes[ni]->get_position_in_parent())
+ if (p_nodes[ni]->get_parent() != p_new_parent || p_position_in_parent + ni != p_nodes[ni]->get_index())
no_change = false;
}
@@ -1644,7 +1644,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
owners.push_back(E->get());
}
- int child_pos = node->get_position_in_parent();
+ int child_pos = node->get_index();
editor_data->get_undo_redo().add_undo_method(node->get_parent(), "add_child", node);
editor_data->get_undo_redo().add_undo_method(node->get_parent(), "move_child", node, child_pos);
@@ -1918,7 +1918,7 @@ Node *SceneTreeDock::_get_selection_group_tail(Node *p_node, List<Node *> p_list
Node *tail = p_node;
Node *parent = tail->get_parent();
- for (int i = p_node->get_position_in_parent(); i < parent->get_child_count(); i++) {
+ for (int i = p_node->get_index(); i < parent->get_child_count(); i++) {
Node *sibling = parent->get_child(i);
if (p_list.find(sibling))