Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Turri <enricoturri@seznam.cz>2020-03-02 14:33:17 +0300
committerEnrico Turri <enricoturri@seznam.cz>2020-03-02 14:33:17 +0300
commit7cb92ef5e8bdd4f1110ec941ff2bbd54bc609da0 (patch)
tree1eb5a339678b9b4dd3ecb110e4123f7df7e2acf7
parent7388947e1f775fd4debebc54dcfb97fef1909f53 (diff)
#3646 - Ask user whether remove from recent projects list a project no longer available
-rw-r--r--src/slic3r/GUI/MainFrame.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp
index 32d68b3ed..9527b6c29 100644
--- a/src/slic3r/GUI/MainFrame.cpp
+++ b/src/slic3r/GUI/MainFrame.cpp
@@ -422,18 +422,19 @@ void MainFrame::init_menubar()
m_plater->load_project(filename);
else
{
- wxMessageDialog msg(this, _(L("The selected project is no more available")), _(L("Error")));
- msg.ShowModal();
-
- m_recent_projects.RemoveFileFromHistory(file_id);
- std::vector<std::string> recent_projects;
- size_t count = m_recent_projects.GetCount();
- for (size_t i = 0; i < count; ++i)
+ 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);
+ if (msg.ShowModal() == wxID_YES)
{
- recent_projects.push_back(into_u8(m_recent_projects.GetHistoryFile(i)));
+ m_recent_projects.RemoveFileFromHistory(file_id);
+ std::vector<std::string> recent_projects;
+ size_t count = m_recent_projects.GetCount();
+ for (size_t i = 0; i < count; ++i)
+ {
+ recent_projects.push_back(into_u8(m_recent_projects.GetHistoryFile(i)));
+ }
+ wxGetApp().app_config->set_recent_projects(recent_projects);
+ wxGetApp().app_config->save();
}
- wxGetApp().app_config->set_recent_projects(recent_projects);
- wxGetApp().app_config->save();
}
}, wxID_FILE1, wxID_FILE9);