MCPcopy Create free account
hub / github.com/GollyGang/ready / OpenRecentPattern

Method OpenRecentPattern

src/gui/frame.cpp:1777–1795  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1775// ---------------------------------------------------------------------
1776
1777void MyFrame::OpenRecentPattern(int id)
1778{
1779 wxMenuItem* item = patternSubMenu->FindItem(id);
1780 if (item) {
1781 wxString path = item->GetText();
1782 #ifdef __WXGTK__
1783 // remove duplicate underscores
1784 path.Replace(wxT("__"), wxT("_"));
1785 #endif
1786 // remove duplicate ampersands
1787 path.Replace(wxT("&&"), wxT("&"));
1788
1789 // if path isn't absolute then prepend Ready directory
1790 wxFileName fname(path);
1791 if (!fname.IsAbsolute()) path = readydir + path;
1792
1793 OpenFile(path);
1794 }
1795}
1796
1797// ---------------------------------------------------------------------
1798

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected