From b040c8972c3e6136a7bff193e3702c93fc7343c6 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Mon, 1 Feb 2016 19:48:27 -0800 Subject: [PATCH] Add recent file and projects to FileBrowser --- specter/lib/FileBrowser.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/specter/lib/FileBrowser.cpp b/specter/lib/FileBrowser.cpp index eefc294cf..7b2225280 100644 --- a/specter/lib/FileBrowser.cpp +++ b/specter/lib/FileBrowser.cpp @@ -83,6 +83,18 @@ FileBrowser::FileBrowser(ViewResources& res, View& parentView, const std::string m_systemBookmarkBind.m_entries.emplace_back(std::move(loc)); m_systemBookmarks.m_view->updateData(); + const std::vector* recentProjects = vm.recentProjects(); + + for (auto& proj : *recentProjects) + m_projectBookmarkBind.m_entries.emplace_back(proj); + m_projectBookmarks.m_view->updateData(); + + const std::vector* recentFiles = vm.recentFiles(); + + for (auto& file : *recentFiles) + m_recentBookmarkBind.m_entries.emplace_back(file); + m_recentBookmarks.m_view->updateData(); + navigateToPath(initialPath); m_split.m_view.reset(new SplitView(res, *this, nullptr, SplitView::Axis::Vertical, 0.2,