1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed an issue where ComboBox popup menus would flicker if a second combobox menu was opened

This commit is contained in:
hogliux 2017-08-30 14:59:26 +01:00
parent 858b206553
commit 66da02d233

View file

@ -505,7 +505,14 @@ void ComboBox::showPopupIfNotActive()
if (! menuActive)
{
menuActive = true;
showPopup();
SafePointer<ComboBox> safePointer (this);
// as this method was triggered by a mouse event, the same mouse event may have
// exited the modal state of other popups currently on the screen. By calling
// showPopup asynchronously, we are giving the other popups a chance to properly
// close themselves
MessageManager::callAsync([safePointer] () mutable { if (safePointer != nullptr) safePointer->showPopup(); });
}
}