diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-09 08:33:26 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-09 08:33:26 +0100 |
commit | e7905f4f48c18daa948838549f2846b79d4bd1d4 (patch) | |
tree | a7e81d1d846ef21c71834fc5290ac9f24303306a /scene/gui/popup_menu.cpp | |
parent | bb08997b8725780670be30afa96354e7c38586fd (diff) | |
parent | 2b815df3c19499f9fcf1575cfce1477876030e81 (diff) | |
download | redot-engine-e7905f4f48c18daa948838549f2846b79d4bd1d4.tar.gz |
Merge pull request #71045 from reduz/use-bitfield-in-core-types
Use BitField<> in core type masks
Diffstat (limited to 'scene/gui/popup_menu.cpp')
-rw-r--r-- | scene/gui/popup_menu.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index 942e6fac7f..4fc0e5b05e 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -395,10 +395,10 @@ void PopupMenu::gui_input(const Ref<InputEvent> &p_event) { // Activate the item on release of either the left mouse button or // any mouse button held down when the popup was opened. // This allows for opening the popup and triggering an action in a single mouse click. - if (button_idx == MouseButton::LEFT || (initial_button_mask & mouse_button_to_mask(button_idx)) != MouseButton::NONE) { + if (button_idx == MouseButton::LEFT || initial_button_mask.has_flag(mouse_button_to_mask(button_idx))) { bool was_during_grabbed_click = during_grabbed_click; during_grabbed_click = false; - initial_button_mask = MouseButton::NONE; + initial_button_mask.clear(); // Disable clicks under a time threshold to avoid selection right when opening the popup. uint64_t now = OS::get_singleton()->get_ticks_msec(); |