1207
1207
SessionEntry session;
1208
1208
session.SetWorkspaceName(sessionName);
1209
1209
GetMainBook()->SaveSession(session);
1210
ManagerST::Get()->GetBreakpointsMgr()->SaveSession(session);
1210
1211
SessionManager::Get().Save(sessionName, session);
1211
1212
SessionManager::Get().SetLastWorkspaceName(sessionName);
3249
3251
SetStatusMessage(msg, col);
3252
void Frame::OnReloadExternallModified(wxCommandEvent& e)
3254
void Frame::OnReloadExternallModified(wxCommandEvent& e)
3254
3256
wxUnusedVar(e);
3255
GetMainBook()->ReloadExternallyModified();
3257
ReloadExternallyModifiedProjectFiles();
3258
GetMainBook()->ReloadExternallyModified();
3261
void Frame::ReloadExternallyModifiedProjectFiles()
3263
Workspace *workspace = WorkspaceST::Get();
3264
bool workspace_modified = false, project_modified = false;
3266
// check if the workspace needs reloading and ask the user for confirmation
3268
if (workspace->GetWorkspaceLastModifiedTime() < workspace->GetFileLastModifiedTime())
3270
// always update last modification time: if the user chooses to reload it
3271
// will not matter, and it avoids the program prompting the user repeatedly
3272
// if he chooses not to reload the workspace
3273
workspace->SetWorkspaceLastModifiedTime(workspace->GetFileLastModifiedTime());
3274
workspace_modified = true;
3277
// check if any of the projects in the workspace needs reloading
3278
wxArrayString projects;
3279
workspace->GetProjectList(projects);
3281
for (size_t i = 0; i < projects.GetCount(); ++i)
3284
ProjectPtr proj = workspace->FindProjectByName(projects[i], errStr);
3286
if (proj->GetProjectLastModifiedTime() < proj->GetFileLastModifiedTime())
3288
// always update last modification time: if the user chooses to reload it
3289
// will not matter, and it avoids the program prompting the user repeatedly
3290
// if he chooses not to reload some of the projects
3291
proj->SetProjectLastModifiedTime(proj->GetFileLastModifiedTime());
3292
project_modified = true;
3296
if (!project_modified && !workspace_modified)
3299
if(wxMessageBox(_("Workspace or project settings have been modified, would you like to reload the workspace and all contained projects?"), wxT("CodeLite"), wxICON_QUESTION|wxYES_NO) == wxYES) {
3300
ManagerST::Get()->ReloadWorkspace();