Skip to content

Commit

Permalink
when adding a field to a graph configuration, the fields value from t…
Browse files Browse the repository at this point in the history
…he graph will be set as the initial configured value in the graph configuration
  • Loading branch information
M-Wicenec committed Nov 4, 2024
1 parent aa2da57 commit a06dab4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Eagle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1490,9 +1490,8 @@ export class Eagle {
*/

newConfig = () : void => {

// clone existing active config, assign new id
const c: GraphConfig = this.logicalGraph().getActiveGraphConfig().clone();
const c: GraphConfig = new GraphConfig
c.setId(Utils.generateGraphConfigId());


Expand Down
4 changes: 2 additions & 2 deletions src/ParameterTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ export class ParameterTable {

if (graphConfig){
if (add){
graphConfig.addField(currentField);
graphConfig.addValue(currentField.getNodeId(), currentField.getId(), currentField.getValue())
} else {
graphConfig.removeField(currentField);
}
Expand All @@ -386,7 +386,7 @@ export class ParameterTable {

// add/remove the field that was requested in the first place
if (add){
graphConfig.addField(currentField);
graphConfig.addValue(currentField.getNodeId(), currentField.getId(), currentField.getValue())
} else {
graphConfig.removeField(currentField);
}
Expand Down

0 comments on commit a06dab4

Please sign in to comment.