From 57438ed21599d575a95802a71edb27a09caa4ba8 Mon Sep 17 00:00:00 2001 From: pb Date: Fri, 29 Mar 2024 17:53:48 +0100 Subject: [PATCH] removed wrong logic from previous change --- models/mxgraph.go | 15 --------------- models/workflow.go | 1 - 2 files changed, 16 deletions(-) diff --git a/models/mxgraph.go b/models/mxgraph.go index 57cfd01..fec9773 100644 --- a/models/mxgraph.go +++ b/models/mxgraph.go @@ -2,7 +2,6 @@ package models import ( "encoding/xml" - "strconv" ) type MxGraphModel struct { @@ -45,17 +44,3 @@ func newMxIssue(message string) error { return &mxissue{message} } -// mxCell inside object tags are create twice when unmarshalling -// once as they appear in the xml inside the MxObject struct and once in the MxCell struct -// so once retrieved from object we remove them from the root's MxCell list -func (m *MxGraphModel) removeMxCell(id string){ - int_id,_ := strconv.Atoi(id) - int_id = int_id + 1 - cell_id := strconv.Itoa(int_id) - - for i, cell := range(m.Root.MxCell){ - if cell.ID == cell_id { - m.Root.MxCell = append(m.Root.MxCell[:i],m.Root.MxCell[i+1:]...) - } - } -} \ No newline at end of file diff --git a/models/workflow.go b/models/workflow.go index 46241f0..938b22a 100644 --- a/models/workflow.go +++ b/models/workflow.go @@ -624,7 +624,6 @@ func (ws Workspace) ConsumeMxGraphModel(xmlmodel MxGraphModel) (returned_wf *Wor // all components in a map[string]Component where the key // is the component's ID in the mxGraph and the value the Component object returned_wf.UpdateObj(resObj,object.ID) - xmlmodel.removeMxCell(object.ID) // Construct the object corresponding to the componant's type and use its addUserInput method if(resObj.getRtype() == rtype.COMPUTING){