mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
FileChooser: Check JUCE_MODAL_LOOPS_PERMITTED in Native::runModally()
This commit is contained in:
parent
08e6d2f9ee
commit
e18284978f
4 changed files with 14 additions and 0 deletions
|
|
@ -140,6 +140,8 @@ public:
|
|||
{
|
||||
#if JUCE_MODAL_LOOPS_PERMITTED
|
||||
runModalLoop();
|
||||
#else
|
||||
jassertfalse;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ public:
|
|||
|
||||
void runModally() override
|
||||
{
|
||||
#if JUCE_MODAL_LOOPS_PERMITTED
|
||||
child.start (args, ChildProcess::wantStdOut);
|
||||
|
||||
while (child.isRunning())
|
||||
|
|
@ -73,6 +74,9 @@ public:
|
|||
break;
|
||||
|
||||
finish (false);
|
||||
#else
|
||||
jassertfalse;
|
||||
#endif
|
||||
}
|
||||
|
||||
void launch() override
|
||||
|
|
|
|||
|
|
@ -183,6 +183,7 @@ public:
|
|||
|
||||
void runModally() override
|
||||
{
|
||||
#if JUCE_MODAL_LOOPS_PERMITTED
|
||||
ensurePanelSafe();
|
||||
|
||||
std::unique_ptr<TemporaryMainMenuWithStandardCommands> tempMenu;
|
||||
|
|
@ -193,6 +194,9 @@ public:
|
|||
jassert (panel != nil);
|
||||
auto result = [panel runModal];
|
||||
finished (result);
|
||||
#else
|
||||
jassertfalse;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool canModalEventBeSentToComponent (const Component* targetComponent) override
|
||||
|
|
|
|||
|
|
@ -758,12 +758,16 @@ public:
|
|||
|
||||
void runModally() override
|
||||
{
|
||||
#if JUCE_MODAL_LOOPS_PERMITTED
|
||||
enterModalState (true);
|
||||
nativeFileChooser->open (false);
|
||||
exitModalState (nativeFileChooser->results.size() > 0 ? 1 : 0);
|
||||
nativeFileChooser->cancel();
|
||||
|
||||
owner.finished (nativeFileChooser->results);
|
||||
#else
|
||||
jassertfalse;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool canModalEventBeSentToComponent (const Component* targetComponent) override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue