mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-01 03:10:06 +00:00
Refactored some TreeView key handling. Introjucer: now restores the last set of open documents for a project.
This commit is contained in:
parent
3d72789127
commit
25e7361f2c
13 changed files with 309 additions and 123 deletions
|
|
@ -94,6 +94,7 @@ void MainWindow::createProjectContentCompIfNeeded()
|
|||
{
|
||||
clearContentComponent();
|
||||
setContentOwned (JucerApplication::getApp()->createProjectContentComponent(), false);
|
||||
jassert (getProjectContentComponent() != nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -126,13 +127,17 @@ bool MainWindow::closeProject (Project* project)
|
|||
|
||||
getAppProperties().setValue (getProjectWindowPosName(), getWindowStateAsString());
|
||||
|
||||
if (! JucerApplication::getApp()->openDocumentManager.closeAllDocumentsUsingProject (*project, true))
|
||||
return false;
|
||||
|
||||
ProjectContentComponent* const pcc = getProjectContentComponent();
|
||||
|
||||
if (pcc != nullptr)
|
||||
{
|
||||
pcc->saveTreeViewState();
|
||||
pcc->saveOpenDocumentList();
|
||||
pcc->hideEditor();
|
||||
}
|
||||
|
||||
if (! JucerApplication::getApp()->openDocumentManager.closeAllDocumentsUsingProject (*project, true))
|
||||
return false;
|
||||
|
||||
FileBasedDocument::SaveResult r = project->saveIfNeededAndUserAgrees();
|
||||
|
||||
|
|
@ -373,6 +378,10 @@ bool MainWindowList::openFile (const File& file)
|
|||
w->setProject (newDoc.release());
|
||||
w->makeVisible();
|
||||
avoidSuperimposedWindows (w);
|
||||
|
||||
jassert (w->getProjectContentComponent() != nullptr);
|
||||
w->getProjectContentComponent()->reloadLastOpenDocuments();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue