summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorPaulb23 <p_batty@hotmail.co.uk>2020-07-28 14:33:46 +0100
committerPaulb23 <p_batty@hotmail.co.uk>2020-09-10 20:35:28 +0100
commit907f9f2a8444be195d489ae614f88018a10cf6ce (patch)
tree32cfb8f312501e2a0b3b7aeb5c2e203cb8fa1049 /scene/gui
parent1353ed5e44a725308292ce44d24d7cf76b0af272 (diff)
Changed line_edited_from(from) to lines_edit_from(from, to)
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/code_edit.cpp4
-rw-r--r--scene/gui/code_edit.h2
-rw-r--r--scene/gui/text_edit.cpp6
3 files changed, 6 insertions, 6 deletions
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp
index 3d4f8222c4..2c5baa7786 100644
--- a/scene/gui/code_edit.cpp
+++ b/scene/gui/code_edit.cpp
@@ -88,7 +88,7 @@ void CodeEdit::_gutter_clicked(int p_line, int p_gutter) {
}
}
-void CodeEdit::_line_edited_from(int p_line) {
+void CodeEdit::_lines_edited_from(int p_from_line, int p_to_line) {
int line_count = get_line_count();
if (line_count != cached_line_count) {
int lc = line_count;
@@ -119,7 +119,7 @@ CodeEdit::CodeEdit() {
set_gutter_type(0, GUTTER_TPYE_CUSTOM);
set_gutter_custom_draw(0, this, "_line_number_draw_callback");
- connect("line_edited_from", callable_mp(this, &CodeEdit::_line_edited_from));
+ connect("lines_edited_from", callable_mp(this, &CodeEdit::_lines_edited_from));
connect("gutter_clicked", callable_mp(this, &CodeEdit::_gutter_clicked));
connect("gutter_added", callable_mp(this, &CodeEdit::_update_gutter_indexes));
diff --git a/scene/gui/code_edit.h b/scene/gui/code_edit.h
index 990d3212c0..66cae82437 100644
--- a/scene/gui/code_edit.h
+++ b/scene/gui/code_edit.h
@@ -47,7 +47,7 @@ private:
void _line_number_draw_callback(int p_line, int p_gutter, const Rect2 &p_region);
void _gutter_clicked(int p_line, int p_gutter);
- void _line_edited_from(int p_line);
+ void _lines_edited_from(int p_from_line, int p_to_line);
void _update_gutter_indexes();
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index c211e2ce7e..7a45f230d4 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -3924,7 +3924,7 @@ void TextEdit::_base_insert_text(int p_line, int p_char, const String &p_text, i
}
text_changed_dirty = true;
}
- emit_signal("line_edited_from", p_line);
+ emit_signal("lines_edited_from", p_line, r_end_line);
}
String TextEdit::_base_get_text(int p_from_line, int p_from_column, int p_to_line, int p_to_column) const {
@@ -3987,7 +3987,7 @@ void TextEdit::_base_remove_text(int p_from_line, int p_from_column, int p_to_li
}
text_changed_dirty = true;
}
- emit_signal("line_edited_from", p_from_line);
+ emit_signal("lines_edited_from", p_to_line, p_from_line);
}
void TextEdit::_insert_text(int p_line, int p_char, const String &p_text, int *r_end_line, int *r_end_char) {
@@ -7187,7 +7187,7 @@ void TextEdit::_bind_methods() {
ADD_SIGNAL(MethodInfo("cursor_changed"));
ADD_SIGNAL(MethodInfo("text_changed"));
- ADD_SIGNAL(MethodInfo("line_edited_from", PropertyInfo(Variant::INT, "line")));
+ ADD_SIGNAL(MethodInfo("lines_edited_from", PropertyInfo(Variant::INT, "from_line"), PropertyInfo(Variant::INT, "to_line")));
ADD_SIGNAL(MethodInfo("request_completion"));
ADD_SIGNAL(MethodInfo("gutter_clicked", PropertyInfo(Variant::INT, "line"), PropertyInfo(Variant::INT, "gutter")));
ADD_SIGNAL(MethodInfo("gutter_added"));