Re: Unable to enter custom negative spaces

2015-06-30 Thread Georg Baum
Jürgen Spitzmüller wrote: The method formatFPNumber in lstrings.h does not work properly with negative doubles. It seems to round them (-1.5 is output as -2). The problem seems to be in this code. Georg? I simply forgot to think about negative numbers. I slightly changed the current fix,

Re: Unable to enter custom negative spaces

2015-06-30 Thread Georg Baum
Jürgen Spitzmüller wrote: > The method formatFPNumber in lstrings.h does not work properly with > negative doubles. It seems to round them (-1.5 is output as -2). > > The problem seems to be in this code. Georg? I simply forgot to think about negative numbers. I slightly changed the current

Re: Unable to enter custom negative spaces

2015-06-26 Thread Jürgen Spitzmüller
2015-06-25 16:46 GMT+02:00 Kornel Benko: Good guess. Bisecting leads to it too. 9e16608867f72e417b04267d080fed28802e92a4 is the first bad commit commit 9e16608867f72e417b04267d080fed28802e92a4 Author: Juergen Spitzmueller sp...@lyx.org Date: Wed May 20 19:12:23 2015 +0200 Fix

Re: Unable to enter custom negative spaces

2015-06-26 Thread Jürgen Spitzmüller
2015-06-26 15:30 GMT+02:00 Kornel Benko: It works. And I don't think it is math-ignorant. I plead for commit. OK, I've done so. Jürgen Kornel

Re: Unable to enter custom negative spaces

2015-06-26 Thread Enrico Forestieri
On Fri, Jun 26, 2015 at 02:50:13PM +0200, Jürgen Spitzmüller wrote: 2015-06-26 14:43 GMT+02:00 Jürgen Spitzmüller: The problem seems to be in this code. Georg? // Prevent outputs of 23.4217 but output small numbers // with at least 6 significant digits. double

Re: Unable to enter custom negative spaces

2015-06-26 Thread Enrico Forestieri
On Fri, Jun 26, 2015 at 04:58:02AM -0700, Kornel Benko wrote: Now one can enter negative value (like -0.3cm), but applying it changes to -0cm. Using -3mm instead works as expected. Most probably, the decimal separator is a comma in your locale, so -0,3cm should work. However, I agree that

Re: Unable to enter custom negative spaces

2015-06-26 Thread Kornel Benko
Am Freitag, 26. Juni 2015 um 22:44:28, schrieb Enrico Forestieri for...@lyx.org On Fri, Jun 26, 2015 at 04:58:02AM -0700, Kornel Benko wrote: Now one can enter negative value (like -0.3cm), but applying it changes to -0cm. Using -3mm instead works as expected. Most probably, the

Re: Unable to enter custom negative spaces

2015-06-26 Thread Kornel Benko
Am Freitag, 26. Juni 2015 um 14:50:13, schrieb Jürgen Spitzmüller sp...@lyx.org 2015-06-26 14:43 GMT+02:00 Jürgen Spitzmüller: The problem seems to be in this code. Georg? // Prevent outputs of 23.4217 but output small numbers // with at least 6 significant digits.

Re: Unable to enter custom negative spaces

2015-06-26 Thread Jürgen Spitzmüller
2015-06-26 13:58 GMT+02:00 Kornel Benko kor...@lyx.org: Sort of. Now one can enter negative value (like -0.3cm), but applying it changes to -0cm. Using -3mm instead works as expected. The method formatFPNumber in lstrings.h does not work properly with negative doubles. It seems to round them

Re: Unable to enter custom negative spaces

2015-06-26 Thread Jürgen Spitzmüller
2015-06-26 14:43 GMT+02:00 Jürgen Spitzmüller: The problem seems to be in this code. Georg? // Prevent outputs of 23.4217 but output small numbers // with at least 6 significant digits. double const logarithm = log10(x); os std::setprecision(max(6 -

Re: Unable to enter custom negative spaces

2015-06-26 Thread Kornel Benko
Am Freitag, 26. Juni 2015 um 13:21:39, schrieb Jürgen Spitzmüller sp...@lyx.org 2015-06-25 16:46 GMT+02:00 Kornel Benko: Good guess. Bisecting leads to it too. 9e16608867f72e417b04267d080fed28802e92a4 is the first bad commit commit 9e16608867f72e417b04267d080fed28802e92a4 Author:

Re: Unable to enter custom negative spaces

2015-06-26 Thread Jürgen Spitzmüller
2015-06-25 16:46 GMT+02:00 Kornel Benko: > > Good guess. Bisecting leads to it too. > 9e16608867f72e417b04267d080fed28802e92a4 is the first bad commit > commit 9e16608867f72e417b04267d080fed28802e92a4 > Author: Juergen Spitzmueller > Date: Wed May 20 19:12:23 2015 +0200 > >

Re: Unable to enter custom negative spaces

2015-06-26 Thread Kornel Benko
Am Freitag, 26. Juni 2015 um 13:21:39, schrieb Jürgen Spitzmüller > 2015-06-25 16:46 GMT+02:00 Kornel Benko: > > > > > Good guess. Bisecting leads to it too. > > 9e16608867f72e417b04267d080fed28802e92a4 is the first bad commit > > commit 9e16608867f72e417b04267d080fed28802e92a4 >

Re: Unable to enter custom negative spaces

2015-06-26 Thread Jürgen Spitzmüller
2015-06-26 13:58 GMT+02:00 Kornel Benko : > Sort of. Now one can enter negative value (like -0.3cm), but applying it > changes to -0cm. > Using -3mm instead works as expected. > The method formatFPNumber in lstrings.h does not work properly with negative doubles. It seems to

Re: Unable to enter custom negative spaces

2015-06-26 Thread Jürgen Spitzmüller
2015-06-26 14:43 GMT+02:00 Jürgen Spitzmüller: > The problem seems to be in this code. Georg? > > // Prevent outputs of 23.4217 but output small numbers > // with at least 6 significant digits. > double const logarithm = log10(x); > os << std::setprecision(max(6 -

Re: Unable to enter custom negative spaces

2015-06-26 Thread Kornel Benko
Am Freitag, 26. Juni 2015 um 14:50:13, schrieb Jürgen Spitzmüller > 2015-06-26 14:43 GMT+02:00 Jürgen Spitzmüller: > > > The problem seems to be in this code. Georg? > > > > // Prevent outputs of 23.4217 but output small numbers > > // with at least 6

Re: Unable to enter custom negative spaces

2015-06-26 Thread Jürgen Spitzmüller
2015-06-26 15:30 GMT+02:00 Kornel Benko: > It works. And I don't think it is math-ignorant. I plead for commit. > OK, I've done so. Jürgen > > Kornel

Re: Unable to enter custom negative spaces

2015-06-26 Thread Enrico Forestieri
On Fri, Jun 26, 2015 at 04:58:02AM -0700, Kornel Benko wrote: > > Now one can enter negative value (like -0.3cm), but applying it changes to > -0cm. > Using -3mm instead works as expected. Most probably, the decimal separator is a comma in your locale, so -0,3cm should work. However, I agree

Re: Unable to enter custom negative spaces

2015-06-26 Thread Enrico Forestieri
On Fri, Jun 26, 2015 at 02:50:13PM +0200, Jürgen Spitzmüller wrote: > 2015-06-26 14:43 GMT+02:00 Jürgen Spitzmüller: > > > The problem seems to be in this code. Georg? > > > > // Prevent outputs of 23.4217 but output small numbers > > // with at least 6 significant digits. >

Re: Unable to enter custom negative spaces

2015-06-26 Thread Kornel Benko
Am Freitag, 26. Juni 2015 um 22:44:28, schrieb Enrico Forestieri > On Fri, Jun 26, 2015 at 04:58:02AM -0700, Kornel Benko wrote: > > > > Now one can enter negative value (like -0.3cm), but applying it changes to > > -0cm. > > Using -3mm instead works as expected. > > Most

Re: Unable to enter custom negative spaces

2015-06-25 Thread Kornel Benko
Am Donnerstag, 25. Juni 2015 um 10:04:47, schrieb Scott Kostyshak skost...@lyx.org On Thu, Jun 25, 2015 at 07:01:06AM -0700, Kornel Benko wrote: The dialog in master does not allow negative values anymore. Neither for horizontal, nor vertical space. I can reproduce. Possibly related to

Re: Unable to enter custom negative spaces

2015-06-25 Thread Scott Kostyshak
On Thu, Jun 25, 2015 at 07:01:06AM -0700, Kornel Benko wrote: The dialog in master does not allow negative values anymore. Neither for horizontal, nor vertical space. I can reproduce. Possibly related to 9e166088. Scott

Re: Unable to enter custom negative spaces

2015-06-25 Thread Scott Kostyshak
On Thu, Jun 25, 2015 at 07:01:06AM -0700, Kornel Benko wrote: > The dialog in master does not allow negative values anymore. > Neither for horizontal, nor vertical space. I can reproduce. Possibly related to 9e166088. Scott

Re: Unable to enter custom negative spaces

2015-06-25 Thread Kornel Benko
Am Donnerstag, 25. Juni 2015 um 10:04:47, schrieb Scott Kostyshak > On Thu, Jun 25, 2015 at 07:01:06AM -0700, Kornel Benko wrote: > > The dialog in master does not allow negative values anymore. > > Neither for horizontal, nor vertical space. > > I can reproduce. Possibly