mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Introjucer: fix for menu glitch when clicking "save and open" button in dual iOS/OSX projects.
This commit is contained in:
parent
ff99c6dbc1
commit
3e5b15a8e3
2 changed files with 13 additions and 15 deletions
|
|
@ -594,8 +594,11 @@ StringArray ProjectContentComponent::getExportersWhichCanLaunch() const
|
|||
return s;
|
||||
}
|
||||
|
||||
void ProjectContentComponent::openInIDE (int exporterIndex)
|
||||
void ProjectContentComponent::openInIDE (int exporterIndex, bool saveFirst)
|
||||
{
|
||||
if (saveFirst)
|
||||
saveProject();
|
||||
|
||||
int i = 0;
|
||||
|
||||
if (project != nullptr)
|
||||
|
|
@ -605,13 +608,13 @@ void ProjectContentComponent::openInIDE (int exporterIndex)
|
|||
break;
|
||||
}
|
||||
|
||||
static void openIDEMenuCallback (int result, ProjectContentComponent* comp)
|
||||
static void openIDEMenuCallback (int result, ProjectContentComponent* comp, bool saveFirst)
|
||||
{
|
||||
if (comp != nullptr && result > 0)
|
||||
comp->openInIDE (result - 1);
|
||||
comp->openInIDE (result - 1, saveFirst);
|
||||
}
|
||||
|
||||
void ProjectContentComponent::openInIDE()
|
||||
void ProjectContentComponent::openInIDE (bool saveFirst)
|
||||
{
|
||||
if (project != nullptr)
|
||||
{
|
||||
|
|
@ -625,11 +628,11 @@ void ProjectContentComponent::openInIDE()
|
|||
menu.addItem (i + 1, possibleExporters[i]);
|
||||
|
||||
menu.showMenuAsync (PopupMenu::Options(),
|
||||
ModalCallbackFunction::forComponent (openIDEMenuCallback, this));
|
||||
ModalCallbackFunction::forComponent (openIDEMenuCallback, this, saveFirst));
|
||||
}
|
||||
else
|
||||
{
|
||||
openInIDE (0);
|
||||
openInIDE (0, saveFirst);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -911,16 +914,11 @@ bool ProjectContentComponent::perform (const InvocationInfo& info)
|
|||
case CommandIDs::showProjectSettings: showProjectSettings(); break;
|
||||
case CommandIDs::showProjectModules: showModules(); break;
|
||||
|
||||
case CommandIDs::openInIDE: openInIDE(); break;
|
||||
case CommandIDs::openInIDE: openInIDE (false); break;
|
||||
case CommandIDs::saveAndOpenInIDE: openInIDE (true); break;
|
||||
|
||||
case CommandIDs::deleteSelectedItem: deleteSelectedTreeItems(); break;
|
||||
|
||||
case CommandIDs::saveAndOpenInIDE:
|
||||
if (saveProject())
|
||||
openInIDE();
|
||||
|
||||
break;
|
||||
|
||||
case CommandIDs::showTranslationTool: showTranslationTool(); break;
|
||||
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ public:
|
|||
|
||||
bool saveProject();
|
||||
void closeProject();
|
||||
void openInIDE();
|
||||
void openInIDE (int exporterIndex);
|
||||
void openInIDE (bool saveFirst);
|
||||
void openInIDE (int exporterIndex, bool saveFirst);
|
||||
|
||||
void showFilesTab();
|
||||
void showConfigTab();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue