Skip to content

Commit 6e42148

Browse files
authored
remove old edge sections and update jsonwrapper (#1104)
1 parent 765676d commit 6e42148

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

plugins/org.eclipse.elk.graph.json/src/org/eclipse/elk/graph/json/JsonAdapter.xtend

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,14 @@ final class JsonAdapter {
186186
}
187187
}
188188

189+
// - - - - - - - - - - - - - - - - - - -
190+
// Remove members from a json object
191+
// - - - - - - - - - - - - - - - - - - -
192+
193+
def void removeJsonObj(JsonObject o, String element) {
194+
o.remove(element)
195+
}
196+
189197
// - - - - - - - - - - - - - - - - - - -
190198
// Add to a json array
191199
// - - - - - - - - - - - - - - - - - - -

plugins/org.eclipse.elk.graph.json/src/org/eclipse/elk/graph/json/JsonImporter.xtend

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ final class JsonImporter {
627627
}
628628

629629
]
630+
jsonObj.removeJsonObj("sections")
630631
jsonObj.addJsonObj("sections", sections)
631632
}
632633

0 commit comments

Comments
 (0)