summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Hilbrunner <mhilbrunner@users.noreply.github.com>2018-06-09 19:35:48 +0200
committerGitHub <noreply@github.com>2018-06-09 19:35:48 +0200
commite9492308379dfc26cd8223ceeaa4c41f98426b56 (patch)
tree37c90c65ae9301574ef404e292119419243e102e
parent0c2622a856ff7341628ef6415c08422c2193cf93 (diff)
parentb0069bb118820e5a62bb240be6bb75a5814b93c5 (diff)
Merge pull request #18298 from gabrii/TextEditScaledSelection
TextEdit scaled selection
-rw-r--r--scene/gui/text_edit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 55a650ff12..1c6ac50b1c 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -447,7 +447,7 @@ void TextEdit::_click_selection_held() {
}
void TextEdit::_update_selection_mode_pointer() {
- Point2 mp = Input::get_singleton()->get_mouse_position() - get_global_position();
+ Point2 mp = get_local_mouse_position();
int row, col;
_get_mouse_pos(Point2i(mp.x, mp.y), row, col);
@@ -462,7 +462,7 @@ void TextEdit::_update_selection_mode_pointer() {
}
void TextEdit::_update_selection_mode_word() {
- Point2 mp = Input::get_singleton()->get_mouse_position() - get_global_position();
+ Point2 mp = get_local_mouse_position();
int row, col;
_get_mouse_pos(Point2i(mp.x, mp.y), row, col);
@@ -515,7 +515,7 @@ void TextEdit::_update_selection_mode_word() {
}
void TextEdit::_update_selection_mode_line() {
- Point2 mp = Input::get_singleton()->get_mouse_position() - get_global_position();
+ Point2 mp = get_local_mouse_position();
int row, col;
_get_mouse_pos(Point2i(mp.x, mp.y), row, col);