Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/project/ProjectManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1125,9 +1125,14 @@ define(function (require, exports, module) {
if (isFolder) {
_projectTree.jstree("sort", data.rslt.obj.parent());
}

_projectTree.jstree("select_node", data.rslt.obj, true);


//If the new item is a file, generate the file display entry.
if (!isFolder) {
_projectTree.jstree("set_text", data.rslt.obj, ViewUtils.getFileEntryDisplay(entry));
}

// Notify listeners that the project model has changed
$(exports).triggerHandler("projectFilesChange");

Expand Down
2 changes: 1 addition & 1 deletion src/utils/CollectionUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ define(function (require, exports, module) {
* @return {boolean} True if the object contains the property
*/
function hasProperty(object, property) {
return Object.prototype.hasOwnProperty.apply(object, [property]);
return Object.prototype.hasOwnProperty.call(object, property);
}

// Define public API
Expand Down