Merge pull request #78268 from Sauermann/fix-remove-unused-variable

Remove unused variable `PopupMenu::parent_rect`
This commit is contained in:
Rémi Verschelde 2023-06-15 15:26:36 +02:00
commit 6587a81910
No known key found for this signature in database
GPG Key ID: C3336907360768E1
5 changed files with 0 additions and 10 deletions

View File

@ -100,7 +100,6 @@ void EditorObjectSelector::_show_popup() {
sub_objects_menu->set_position(gp);
sub_objects_menu->set_size(Size2(size.width, 1));
sub_objects_menu->set_parent_rect(Rect2(Point2(gp - sub_objects_menu->get_position()), size));
sub_objects_menu->take_mouse_focus();
sub_objects_menu->popup();

View File

@ -131,7 +131,6 @@ void MenuBar::_open_popup(int p_index, bool p_focus_item) {
screen_pos.x += screen_size.x - pm->get_size().width;
}
pm->set_position(screen_pos);
pm->set_parent_rect(Rect2(Point2(screen_pos - pm->get_position()), Size2(screen_size.x, screen_pos.y)));
pm->popup();
if (p_focus_item) {

View File

@ -106,7 +106,6 @@ void MenuButton::show_popup() {
gp.x += size.width - popup->get_size().width;
}
popup->set_position(gp);
popup->set_parent_rect(Rect2(Point2(gp - popup->get_position()), size));
// If not triggered by the mouse, start the popup with its first enabled item focused.
if (!_was_pressed_by_mouse()) {

View File

@ -2033,10 +2033,6 @@ String PopupMenu::get_tooltip(const Point2 &p_pos) const {
return items[over].tooltip;
}
void PopupMenu::set_parent_rect(const Rect2 &p_rect) {
parent_rect = p_rect;
}
void PopupMenu::add_autohide_area(const Rect2 &p_area) {
autohide_areas.push_back(p_area);
}

View File

@ -98,7 +98,6 @@ class PopupMenu : public Popup {
bool during_grabbed_click = false;
int mouse_over = -1;
int submenu_over = -1;
Rect2 parent_rect;
String _get_accel_text(const Item &p_item) const;
int _get_mouse_over(const Point2 &p_over) const;
virtual Size2 _get_contents_minimum_size() const override;
@ -292,8 +291,6 @@ public:
void clear();
void set_parent_rect(const Rect2 &p_rect);
virtual String get_tooltip(const Point2 &p_pos) const;
void add_autohide_area(const Rect2 &p_area);