The new package also opens and it added to the tree

This commit is contained in:
Zevenberge 2017-12-23 18:26:46 +01:00
parent 87d5a88a0c
commit a92a253481
1 changed files with 12 additions and 3 deletions

View File

@ -417,6 +417,13 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
}
}
bool tryOpenSourceFile(string filename) {
if (isSupportedSourceTextFileFormat(filename)) {
return openSourceFile(filename, null, true);
}
return false;
}
bool openSourceFile(string filename, ProjectSourceFile file = null, bool activate = true) {
if (!file && !filename)
return false;
@ -1501,9 +1508,7 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
//res.project.reload();
res.project.refresh();
updateTreeGraph();
if (isSupportedSourceTextFileFormat(res.filename)) {
openSourceFile(res.filename, null, true);
}
tryOpenSourceFile(res.filename);
}
}
};
@ -1522,6 +1527,10 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
ProjectFolder newFolder = new ProjectFolder(res.filename);
if(folder) {
folder.addChild(newFolder);
newFolder.refresh();
if(newFolder.childCount > 0){
tryOpenSourceFile(newFolder.child(0).filename);
}
}
updateTreeGraph();
}