removed wrong logic from previous change

This commit is contained in:
pb
2024-03-29 17:53:48 +01:00
parent 10ec990a15
commit 95f0864bbb
2 changed files with 0 additions and 16 deletions

View File

@@ -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:]...)
}
}
}