summaryrefslogtreecommitdiff
path: root/scene/main/viewport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/viewport.cpp')
-rw-r--r--scene/main/viewport.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index c02873cdeb..8561d9aedb 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -172,14 +172,16 @@ ViewportTexture::~ViewportTexture() {
class TooltipPanel : public PanelContainer {
- GDCLASS(TooltipPanel, PanelContainer)
+ GDCLASS(TooltipPanel, PanelContainer);
+
public:
TooltipPanel(){};
};
class TooltipLabel : public Label {
- GDCLASS(TooltipLabel, Label)
+ GDCLASS(TooltipLabel, Label);
+
public:
TooltipLabel(){};
};
@@ -530,7 +532,7 @@ void Viewport::_notification(int p_what) {
Map<ObjectID, uint64_t>::Element *F = physics_2d_mouseover.find(res[i].collider_id);
if (!F) {
- F = physics_2d_mouseover.insert(res[i].collider_id, frame);
+ physics_2d_mouseover.insert(res[i].collider_id, frame);
co->_mouse_enter();
} else {
F->get() = frame;
@@ -1442,9 +1444,7 @@ void Viewport::_gui_show_tooltip() {
return;
}
- Control *rp = which; //->get_root_parent_control();
- if (!rp)
- return;
+ Control *rp = which;
gui.tooltip_popup = which->make_custom_tooltip(tooltip);
@@ -1701,6 +1701,8 @@ bool Viewport::_gui_drop(Control *p_at_control, Point2 p_at_pos, bool p_just_che
void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
+ ERR_FAIL_COND(p_event.is_null())
+
//?
/*
if (!is_visible()) {