>>>>> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

>>>>> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes:
>>> - Instant preview figures are sometimes displaced
>>> http://bugzilla.lyx.org/show_bug.cgi?id=2167

Bo> I still think the patch for 2167 should be applied. The displaced
Bo> preview figures will be an instant annoyance to users, especially
Bo> when this feature (instant preview) is available in 1.3.x and the
Bo> figures was placed just fine.

Jean-Marc> I agree. We should keep the other part of the patch for
Jean-Marc> later.

To be more precise, I propose to apply the following patch.

Lars?

JMarc

Index: lib/ChangeLog
===================================================================
--- lib/ChangeLog	(revision 13268)
+++ lib/ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2006-02-24  Enrico Forestieri  <[EMAIL PROTECTED]>
+
+	* scripts/legacy_lyxpreview2ppm.py (extract_metrics_info): 
+	* scripts/lyxpreview2bitmap.py (extract_metrics_info): fix
+	computation when either ascent or descent is 0. (bug 2167)
+
 2006-02-19  Enrico Forestieri  <[EMAIL PROTECTED]>
 
 	* scripts/lyxpreview2bitmap.py: fix script to work with recent versions
Index: lib/scripts/lyxpreview2bitmap.py
===================================================================
--- lib/scripts/lyxpreview2bitmap.py	(revision 13268)
+++ lib/scripts/lyxpreview2bitmap.py	(working copy)
@@ -103,7 +103,7 @@
         ascent  = string.atof(match.group(2))
 
         frac = 0.5
-        if ascent > 0 and descent > 0:
+        if ascent >= 0 and descent >= 0:
             if abs(ascent + descent) > 0.1:
                 frac = ascent / (ascent + descent)
 
Index: lib/scripts/legacy_lyxpreview2ppm.py
===================================================================
--- lib/scripts/legacy_lyxpreview2ppm.py	(revision 13268)
+++ lib/scripts/legacy_lyxpreview2ppm.py	(working copy)
@@ -95,7 +95,7 @@
                 descent = string.atoi(match.group(3))
 
                 frac = 0.5
-                if ascent > 0 and descent > 0:
+                if ascent >= 0 and descent >= 0:
                     ascent = float(ascent) + tp_ascent
                     descent = float(descent) - tp_descent
 

Reply via email to