summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/viewport.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 6677aa9a84..3ac1a0eaf0 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1708,12 +1708,10 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
if (mm->get_button_mask() == MouseButton::NONE) {
// Nothing pressed.
- bool can_tooltip = true;
-
bool is_tooltip_shown = false;
if (gui.tooltip_popup) {
- if (can_tooltip && gui.tooltip_control) {
+ if (gui.tooltip_control) {
String tooltip = _gui_get_tooltip(over, gui.tooltip_control->get_global_transform().xform_inv(mpos));
if (tooltip.length() == 0) {
@@ -1738,7 +1736,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
}
}
- if (can_tooltip && !is_tooltip_shown) {
+ if (!is_tooltip_shown && over->can_process()) {
if (gui.tooltip_timer.is_valid()) {
gui.tooltip_timer->release_connections();
gui.tooltip_timer = Ref<SceneTreeTimer>();