Browse Source

Ensure that modal components set auto-delete when dismissed are properly cleaned up

tags/2021-05-28
ed 5 years ago
parent
commit
9d0a97c33c
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      modules/juce_gui_basics/components/juce_ModalComponentManager.cpp

+ 6
- 0
modules/juce_gui_basics/components/juce_ModalComponentManager.cpp View File

@@ -35,6 +35,12 @@ struct ModalComponentManager::ModalItem : public ComponentMovementWatcher
jassert (comp != nullptr);
}
~ModalItem() override
{
if (autoDelete)
std::unique_ptr<Component> componentDeleter (component);
}
void componentMovedOrResized (bool, bool) override {}
using ComponentMovementWatcher::componentMovedOrResized;


Loading…
Cancel
Save