Skip to content

Commit

Permalink
perfet sources on root by default
Browse files Browse the repository at this point in the history
  • Loading branch information
smariel committed Aug 16, 2018
1 parent 7c8ebc7 commit c367ec4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions js/obj.PTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -750,9 +750,10 @@ PTree.prototype.listenTreeMenu = function() {
});


// add a source to the root when the button is clicked
// add a perfet source to the root when the button is clicked
$('#bt_addrootsource').click(function() {
that.canvas.tree.addSourceToRoot();
let newItem = that.tree.addSourceToRoot();
newItem.characs.regtype = 7;
that.canvas.refresh();
that.updateClearButtons();
that.saveHistory();
Expand Down Expand Up @@ -780,15 +781,15 @@ PTree.prototype.listenTreeMenu = function() {

// Add a child source to the selected item
$('#bt_addsource').click(function() {
that.canvas.tree.addSource(that.canvas.getSelectedItem());
that.tree.addSource(that.canvas.getSelectedItem());
that.canvas.refresh();
that.saveHistory();
});


// Add a child load to the selected item
$('#bt_addload').click(function() {
that.canvas.tree.addLoad(that.canvas.getSelectedItem());
that.tree.addLoad(that.canvas.getSelectedItem());
that.canvas.refresh();
that.saveHistory();
});
Expand Down

0 comments on commit c367ec4

Please sign in to comment.