Skip to content

Commit

Permalink
Remove unused variable Viewport::gui.last_mouse_focus
Browse files Browse the repository at this point in the history
The last use was removed in January 2023
  • Loading branch information
Sauermann committed May 1, 2024
1 parent 26738ea commit 792b388
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions scene/main/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,6 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
gui.mouse_focus_mask.set_flag(button_mask);
} else {
gui.mouse_focus = gui_find_control(mpos);
gui.last_mouse_focus = gui.mouse_focus;

if (!gui.mouse_focus) {
return;
Expand Down Expand Up @@ -2391,9 +2390,6 @@ void Viewport::_gui_remove_control(Control *p_control) {
gui.forced_mouse_focus = false;
gui.mouse_focus_mask.clear();
}
if (gui.last_mouse_focus == p_control) {
gui.last_mouse_focus = nullptr;
}
if (gui.key_focus == p_control) {
gui.key_focus = nullptr;
}
Expand Down
1 change: 0 additions & 1 deletion scene/main/viewport.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ class Viewport : public Node {
bool key_event_accepted = false;
HashMap<int, ObjectID> touch_focus;
Control *mouse_focus = nullptr;
Control *last_mouse_focus = nullptr;
Control *mouse_click_grabber = nullptr;
BitField<MouseButtonMask> mouse_focus_mask;
Control *key_focus = nullptr;
Expand Down

0 comments on commit 792b388

Please sign in to comment.