Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f389f06
)
ide: workspace: fix making changes in openedFiles list during iteration through same...
author
Rejean Loyer
<redj@ecere.com>
Thu, 14 Jul 2016 15:23:30 +0000
(11:23 -0400)
committer
Jerome St-Louis
<jerome@ecere.com>
Thu, 28 Jul 2016 22:23:33 +0000
(18:23 -0400)
ide/src/project/Workspace.ec
patch
|
blob
|
history
diff --git
a/ide/src/project/Workspace.ec
b/ide/src/project/Workspace.ec
index
73e843d
..
1c368c3
100644
(file)
--- a/
ide/src/project/Workspace.ec
+++ b/
ide/src/project/Workspace.ec
@@
-593,28
+593,30
@@
public:
void OpenPreviouslyOpenedFiles(bool noParsing)
{
void OpenPreviouslyOpenedFiles(bool noParsing)
{
+ Array<String> filePaths {};
holdTracking = true;
holdTracking = true;
- for(ofi : openedFiles)
+ for(ofi : openedFiles; ofi.state != closed)
+ filePaths.Add(CopyString(ofi.path));
+ for(path : filePaths)
{
{
- if(ofi.state != closed)
+ Window file;
+ char absolutePath[MAX_LOCATION];
+ strcpy(absolutePath, workspaceDir);
+ PathCatSlash(absolutePath, path);
+ file = ide.OpenFile(absolutePath, false, true, null, no, normal, noParsing);
+ if(file)
{
{
- Window file;
- char absolutePath[MAX_LOCATION];
- strcpy(absolutePath, workspaceDir);
- PathCatSlash(absolutePath, ofi.path);
- file = ide.OpenFile(absolutePath, false, true, null, no, normal, noParsing);
- if(file)
+ for(prj : projects)
{
{
- for(prj : projects)
- {
- ProjectNode node = prj.topNode.FindByFullPath(absolutePath, true);
- if(node)
- node.EnsureVisible();
- }
+ ProjectNode node = prj.topNode.FindByFullPath(absolutePath, true);
+ if(node)
+ node.EnsureVisible();
}
}
}
holdTracking = false;
}
}
}
holdTracking = false;
+ filePaths.Free();
+ delete filePaths;
}
OpenedFileInfo FindOpenedFileInfo(const char * relativePath, const char * absolutePath)
}
OpenedFileInfo FindOpenedFileInfo(const char * relativePath, const char * absolutePath)