From 8db75a940d6c6885f54ecab168e348b2f0a82f4a Mon Sep 17 00:00:00 2001 From: Pablo Luna Date: Tue, 11 Jan 2011 18:54:20 -0300 Subject: [PATCH] Freemind Import - Fixing relationshis in loop --- mindplot/src/main/javascript/MindmapDesigner.js | 12 +++++------- .../importer/freemind/FreemindImporter.java | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/mindplot/src/main/javascript/MindmapDesigner.js b/mindplot/src/main/javascript/MindmapDesigner.js index c41d10fa..e2960a46 100644 --- a/mindplot/src/main/javascript/MindmapDesigner.js +++ b/mindplot/src/main/javascript/MindmapDesigner.js @@ -629,15 +629,13 @@ mindplot.MindmapDesigner.prototype._buildRelationship = function (model) { if (t.getModel().getId() == fromNodeId) { fromTopic= t; - if(toTopic!=null){ - break; - } - }else if (t.getModel().getId() == toNodeId) + } + if (t.getModel().getId() == toNodeId) { toTopic= t; - if(fromTopic!=null){ - break; - } + } + if(toTopic!=null && fromTopic!=null){ + break; } } diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java index 1fb13773..a00dd0c6 100755 --- a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java +++ b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java @@ -377,7 +377,7 @@ public class FreemindImporter { fontStyle.append(fixFontName(font)); fontStyle.append(";"); - BigInteger bigInteger = font.getSIZE().intValue() < 8 ? BigInteger.valueOf(8) : font.getSIZE(); + BigInteger bigInteger = (font.getSIZE()==null || font.getSIZE().intValue() < 8) ? BigInteger.valueOf(8) : font.getSIZE(); fontStyle.append(bigInteger); fontStyle.append(";"); fontStyle.append(node.getCOLOR());