summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-08-30 20:07:53 +0200
committerGitHub <noreply@github.com>2019-08-30 20:07:53 +0200
commitbbaf35c4f540033d51ed02c5541b2270da288fd0 (patch)
tree2e3901973e2fefea3d543c8aad3fc1791b6f0aee /scene/gui
parentba854bbc7bb0eae230299de4da8dfcb7caf74b69 (diff)
parentb55b3d71a8205f76a86a7d5efc56182a4c066a64 (diff)
Merge pull request #31797 from KoBeWi/release_the_lookup
Perform symbol lookup on button release
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/text_edit.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 1d434e5a2a..06d9a393f9 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -2194,12 +2194,6 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
int row, col;
_get_mouse_pos(Point2i(mb->get_position().x, mb->get_position().y), row, col);
- if (mb->get_command() && highlighted_word != String()) {
-
- emit_signal("symbol_lookup", highlighted_word, row, col);
- return;
- }
-
// Toggle breakpoint on gutter click.
if (draw_breakpoint_gutter) {
int gutter = cache.style_normal->get_margin(MARGIN_LEFT);
@@ -2368,6 +2362,14 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
} else {
if (mb->get_button_index() == BUTTON_LEFT) {
+ if (mb->get_command() && highlighted_word != String()) {
+ int row, col;
+ _get_mouse_pos(Point2i(mb->get_position().x, mb->get_position().y), row, col);
+
+ emit_signal("symbol_lookup", highlighted_word, row, col);
+ return;
+ }
+
dragging_minimap = false;
dragging_selection = false;
can_drag_minimap = false;