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

Introjucer: some internal refactoring

This commit is contained in:
jules 2016-03-08 09:48:07 +00:00
parent 84bc58f0c3
commit e4b96dcf9a
18 changed files with 462 additions and 389 deletions

View file

@ -740,6 +740,38 @@ void ProjectContentComponent::showTranslationTool()
}
}
//==============================================================================
struct AsyncCommandRetrier : public Timer
{
AsyncCommandRetrier (const ApplicationCommandTarget::InvocationInfo& i) : info (i)
{
info.originatingComponent = nullptr;
startTimer (500);
}
void timerCallback() override
{
stopTimer();
IntrojucerApp::getCommandManager().invoke (info, true);
delete this;
}
ApplicationCommandTarget::InvocationInfo info;
JUCE_DECLARE_NON_COPYABLE (AsyncCommandRetrier)
};
bool reinvokeCommandAfterCancellingModalComps (const ApplicationCommandTarget::InvocationInfo& info)
{
if (ModalComponentManager::getInstance()->cancelAllModalComponents())
{
new AsyncCommandRetrier (info);
return true;
}
return false;
}
//==============================================================================
ApplicationCommandTarget* ProjectContentComponent::getNextCommandTarget()
{