mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
parent
c3ea4ebe9c
commit
5faf4c5d63
3 changed files with 18 additions and 7 deletions
|
|
@ -2581,7 +2581,7 @@ public:
|
|||
{
|
||||
const PopupMenu menu (currentModel->getMenuForIndex (i, menuNames [i]));
|
||||
|
||||
MenuRef m = createMenu (menu, menuNames [i], id);
|
||||
MenuRef m = createMenu (menu, menuNames [i], id, i);
|
||||
|
||||
InsertMenu (m, 0);
|
||||
CFRelease (m);
|
||||
|
|
@ -2599,7 +2599,7 @@ public:
|
|||
FlashMenuBar (GetMenuID (menu));
|
||||
}
|
||||
|
||||
void invoke (const int id, ApplicationCommandManager* commandManager, const int topLevelIndex) const
|
||||
void invoke (const int id, ApplicationCommandManager* const commandManager, const int topLevelIndex) const
|
||||
{
|
||||
if (currentModel != 0)
|
||||
{
|
||||
|
|
@ -2620,7 +2620,8 @@ public:
|
|||
private:
|
||||
static MenuRef createMenu (const PopupMenu menu,
|
||||
const String& menuName,
|
||||
int& id)
|
||||
int& id,
|
||||
const int topLevelIndex)
|
||||
{
|
||||
MenuRef m = 0;
|
||||
|
||||
|
|
@ -2631,7 +2632,6 @@ private:
|
|||
CFRelease (name);
|
||||
|
||||
PopupMenu::MenuItemIterator iter (menu);
|
||||
int topLevelIndex = 0;
|
||||
|
||||
while (iter.next())
|
||||
{
|
||||
|
|
@ -2655,7 +2655,7 @@ private:
|
|||
{
|
||||
AppendMenuItemTextWithCFString (m, text, flags, id++, &index);
|
||||
|
||||
MenuRef sub = createMenu (*iter.subMenu, iter.itemName, id);
|
||||
MenuRef sub = createMenu (*iter.subMenu, iter.itemName, id, topLevelIndex);
|
||||
SetMenuItemHierarchicalMenu (m, index, sub);
|
||||
CFRelease (sub);
|
||||
}
|
||||
|
|
@ -2723,7 +2723,6 @@ private:
|
|||
}
|
||||
|
||||
CFRelease (text);
|
||||
++topLevelIndex;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,8 @@ public:
|
|||
|
||||
If a long sysex message is broken up into multiple packets, this callback is made
|
||||
for each packet that arrives until the message is finished, at which point
|
||||
the normal handleIncomingMidiMessage() callback will be made.
|
||||
the normal handleIncomingMidiMessage() callback will be made with the entire
|
||||
message.
|
||||
|
||||
The message passed in will contain the start of a sysex, but won't be finished
|
||||
with the terminating 0x7f byte.
|
||||
|
|
|
|||
|
|
@ -338,6 +338,17 @@ void FileBrowserComponent::selectionChanged()
|
|||
|
||||
void FileBrowserComponent::fileClicked (const File&, const MouseEvent&)
|
||||
{
|
||||
ComponentDeletionWatcher deletionWatcher (this);
|
||||
|
||||
for (int i = listeners.size(); --i >= 0;)
|
||||
{
|
||||
((FileBrowserListener*) listeners.getUnchecked (i))->fileClicked (file, e);
|
||||
|
||||
if (deletionWatcher.hasBeenDeleted())
|
||||
return;
|
||||
|
||||
i = jmin (i, listeners.size() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
void FileBrowserComponent::fileDoubleClicked (const File& f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue