mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-03 03:30:06 +00:00
Introjucer module updater fix.
This commit is contained in:
parent
9772fde950
commit
2ca1f2e704
3 changed files with 15 additions and 1 deletions
|
|
@ -486,7 +486,7 @@ public:
|
|||
bool runModuleUpdate (const String& message)
|
||||
{
|
||||
ModuleList list;
|
||||
list.rescan (ModuleList::getDefaultModulesFolder (nullptr));
|
||||
list.rescan (ModuleList::getDefaultModulesFolder (mainWindowList.getFrontmostProject()));
|
||||
JuceUpdater::show (list, mainWindowList.windows[0], message);
|
||||
|
||||
ModuleList::setLocalModulesFolder (list.getModulesFolder());
|
||||
|
|
|
|||
|
|
@ -528,3 +528,15 @@ void MainWindowList::sendLookAndFeelChange()
|
|||
for (int i = windows.size(); --i >= 0;)
|
||||
windows.getUnchecked(i)->sendLookAndFeelChange();
|
||||
}
|
||||
|
||||
Project* MainWindowList::getFrontmostProject()
|
||||
{
|
||||
Desktop& desktop = Desktop::getInstance();
|
||||
|
||||
for (int i = 0; i < desktop.getNumComponents(); ++i)
|
||||
if (MainWindow* const mw = dynamic_cast <MainWindow*> (desktop.getComponent(i)))
|
||||
if (Project* p = mw->getProject())
|
||||
return p;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,6 +102,8 @@ public:
|
|||
MainWindow* getOrCreateFrontmostWindow();
|
||||
MainWindow* getOrCreateEmptyWindow();
|
||||
|
||||
Project* getFrontmostProject();
|
||||
|
||||
void reopenLastProjects();
|
||||
void saveCurrentlyOpenProjectList();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue