Merge pull request #28205 from mikolasan/26937-hide-popup-menu

Hide popup menu when OptionButton is hidden
This commit is contained in:
Rémi Verschelde
2019-04-29 17:28:49 +02:00
committed by GitHub
4 changed files with 22 additions and 0 deletions

View File

@ -776,6 +776,12 @@ void ColorPickerButton::_notification(int p_what) {
if (p_what == MainLoop::NOTIFICATION_WM_QUIT_REQUEST && popup) {
popup->hide();
}
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
if (popup && !is_visible_in_tree()) {
popup->hide();
}
}
}
void ColorPickerButton::set_pick_color(const Color &p_color) {