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

Use C++14 lambda capture initialisers for initialising deletion checkers

This commit is contained in:
ed 2021-07-12 11:58:29 +01:00
parent 5a78b06f5c
commit a5c3b81f82
33 changed files with 159 additions and 193 deletions

View file

@ -482,14 +482,11 @@ void ComboBox::showPopupIfNotActive()
{
menuActive = true;
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(); });
MessageManager::callAsync ([safePointer = SafePointer<ComboBox> { this }]() mutable { if (safePointer != nullptr) safePointer->showPopup(); });
repaint();
}
}