mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
#3646 - Ask user whether remove from recent projects list a project no longer available
This commit is contained in:
@@ -422,9 +422,9 @@ void MainFrame::init_menubar()
|
|||||||
m_plater->load_project(filename);
|
m_plater->load_project(filename);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxMessageDialog msg(this, _(L("The selected project is no more available")), _(L("Error")));
|
wxMessageDialog msg(this, _(L("The selected project is no longer available.\nDo you want to remove it from the recent projects list ?")), _(L("Error")), wxYES_NO | wxYES_DEFAULT);
|
||||||
msg.ShowModal();
|
if (msg.ShowModal() == wxID_YES)
|
||||||
|
{
|
||||||
m_recent_projects.RemoveFileFromHistory(file_id);
|
m_recent_projects.RemoveFileFromHistory(file_id);
|
||||||
std::vector<std::string> recent_projects;
|
std::vector<std::string> recent_projects;
|
||||||
size_t count = m_recent_projects.GetCount();
|
size_t count = m_recent_projects.GetCount();
|
||||||
@@ -435,6 +435,7 @@ void MainFrame::init_menubar()
|
|||||||
wxGetApp().app_config->set_recent_projects(recent_projects);
|
wxGetApp().app_config->set_recent_projects(recent_projects);
|
||||||
wxGetApp().app_config->save();
|
wxGetApp().app_config->save();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, wxID_FILE1, wxID_FILE9);
|
}, wxID_FILE1, wxID_FILE9);
|
||||||
|
|
||||||
std::vector<std::string> recent_projects = wxGetApp().app_config->get_recent_projects();
|
std::vector<std::string> recent_projects = wxGetApp().app_config->get_recent_projects();
|
||||||
|
|||||||
Reference in New Issue
Block a user