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:
parent
84bc58f0c3
commit
e4b96dcf9a
18 changed files with 462 additions and 389 deletions
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue