]> git.lyx.org Git - features.git/commitdiff
lyx_2_0.py: fix glue length reversion routine
authorUwe Stöhr <uwestoehr@web.de>
Tue, 21 Jul 2009 13:14:02 +0000 (13:14 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Tue, 21 Jul 2009 13:14:02 +0000 (13:14 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30728 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_2_0.py

index 5e8246444a28d7eb05ecbab3108cb081ad0f947c..cbc430660507549594064a3d14aef1ffa819b54e 100644 (file)
@@ -1075,10 +1075,10 @@ def revert_hspace_glue_lengths(document):
       length = latex_length(length)
       # latex_length returns "bool,length"
       m = length.find(",")
-      percent = length[:m]
       length = length[m+1:]
-      # revert the HSpace inset to ERT
-      if percent == "True":
+      document.warning("length: " + length)
+      # allow leading -
+      if length.rfind("-") <> 0 or (length.rfind("-") == 0 and length.rfind("+") > -1):
           if star == True:
               subst = [put_cmd_in_ert("\\hspace*{" + length + "}")]
           else: