From 0affcad5972f73cfb72b366147677c10d94f1737 Mon Sep 17 00:00:00 2001 From: asamoukin Date: Thu, 18 Dec 2008 14:51:00 +0000 Subject: [PATCH] git-svn-id: http://svn.calculate.ru/calculate2/calculate-lib/trunk@696 c91db197-33c1-4113-bf15-f8a5c547ca64 --- pym/cl_profile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pym/cl_profile.py b/pym/cl_profile.py index b864e1f..5603b27 100644 --- a/pym/cl_profile.py +++ b/pym/cl_profile.py @@ -4632,14 +4632,14 @@ class plasma(samba): [],"",[], False,False), xmlFields[0]) - + # Если последним полем BR, удаляем его if xmlFields and self.docObj.getTypeField(xmlFields[-1]) == "br": #print "DEL_BR", xmlFields[-1].nextSibling #and\ if not xmlFields[-1].nextSibling: xmlArea.removeChild(xmlFields[-1]) - + # Если предыдущим полем не (BR или комментарий) - добавляем BR if xmlArea.previousSibling and\ not (self.docObj.getTypeField(xmlArea.previousSibling) == "br" or\ self.docObj.getTypeField(xmlArea.previousSibling) == "comment"): @@ -4649,7 +4649,7 @@ class plasma(samba): False,False), xmlArea) # Если есть предыдущее поле, и поле предыдущеее предыдущему - # не равно BR + # не равно BR или комментарий то добавляем BR if xmlArea.previousSibling: prPrSibling = xmlArea.previousSibling.previousSibling if prPrSibling and\ @@ -4660,6 +4660,7 @@ class plasma(samba): [],"",[], False,False), xmlArea) + # Если после есть BR а за ним ничего нет, удаляем BR if xmlArea.nextSibling and\ self.docObj.getTypeField(xmlArea.nextSibling) == "br": if not xmlArea.nextSibling.nextSibling: