mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-20 01:14:20 +00:00
Minor cleaning up.
This commit is contained in:
parent
a3e2a4840c
commit
3a5b51ef0d
2 changed files with 10 additions and 10 deletions
|
|
@ -249,11 +249,13 @@ ApplicationCommandTarget* ApplicationCommandManager::findDefaultComponentTarget(
|
|||
|
||||
if (c == nullptr && Process::isForegroundProcess())
|
||||
{
|
||||
Desktop& desktop = Desktop::getInstance();
|
||||
|
||||
// getting a bit desperate now: try all desktop comps..
|
||||
for (int i = Desktop::getInstance().getNumComponents(); --i >= 0;)
|
||||
if (ApplicationCommandTarget* const target = findTargetForComponent (Desktop::getInstance().getComponent (i)
|
||||
->getPeer()->getLastFocusedSubcomponent()))
|
||||
return target;
|
||||
for (int i = desktop.getNumComponents(); --i >= 0;)
|
||||
if (ComponentPeer* const peer = desktop.getComponent(i)->getPeer())
|
||||
if (ApplicationCommandTarget* const target = findTargetForComponent (peer->getLastFocusedSubcomponent()))
|
||||
return target;
|
||||
}
|
||||
|
||||
if (c != nullptr)
|
||||
|
|
@ -263,8 +265,8 @@ ApplicationCommandTarget* ApplicationCommandManager::findDefaultComponentTarget(
|
|||
// still be passed up to the top level window anyway, so let's send it to the
|
||||
// content comp.
|
||||
if (ResizableWindow* const resizableWindow = dynamic_cast <ResizableWindow*> (c))
|
||||
if (resizableWindow->getContentComponent() != nullptr)
|
||||
c = resizableWindow->getContentComponent();
|
||||
if (Component* const content = resizableWindow->getContentComponent())
|
||||
c = content;
|
||||
|
||||
if (ApplicationCommandTarget* const target = findTargetForComponent (c))
|
||||
return target;
|
||||
|
|
|
|||
|
|
@ -211,10 +211,8 @@ bool DirectoryContentsList::checkNextFile (bool& hasChanged)
|
|||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
fileFindHandle = nullptr;
|
||||
}
|
||||
|
||||
fileFindHandle = nullptr;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue