diff -r 9ff332964015 -r ff3b01ce0960 xml-freemind.cpp --- a/xml-freemind.cpp Wed Apr 01 15:06:57 2009 +0000 +++ b/xml-freemind.cpp Thu Apr 02 09:46:29 2009 +0000 @@ -94,21 +94,21 @@ if (atts.value ("POSITION")=="left") { model->select ("bo:1"); - lastBranch=model->getSelectedBranch(); - if (lastBranch) - { - lastBranch->addBranch(); - lastBranch=lastBranch->getLastBranch(); + lastBranchItem=model->getSelectedBranchItem(); + if (lastBranchItem) + { + lastBranchItem=model->createBranch(); + lastBranch=lastBranchItem->getBranchObj(); readNodeAttr (atts); } } else if (atts.value ("POSITION")=="right") { model->select ("bo:0"); - lastBranch=model->getSelectedBranch(); - if (lastBranch) - { - lastBranch->addBranch(); - lastBranch=lastBranch->getLastBranch(); + lastBranchItem=model->getSelectedBranchItem(); + if (lastBranchItem) + { + lastBranchItem=model->createBranch(); + lastBranch=lastBranchItem->getBranchObj(); readNodeAttr (atts); } } @@ -116,8 +116,8 @@ { if (state!=StateMap) { - lastBranch->addBranch(); - lastBranch=lastBranch->getLastBranch(); + lastBranchItem=model->createBranch(); + lastBranch=lastBranchItem->getBranchObj(); } readNodeAttr (atts); }