On 02/18/2015 01:37 PM, Kornel Benko wrote:
Am Mittwoch, 18. Februar 2015 um 12:52:24, schrieb Richard Heck
<rgh...@lyx.org>
> On 02/18/2015 11:21 AM, Kornel Benko wrote:
> >
> > > Unfortunately, I don't have much time to deal with this kind of
thing
> >
> > > right now. Along with everyone else in New England, I am
spending way
> >
> > > too much clearing snow. We have had two major blizzards and over
6 feet
> >
> > > (about 2 meters) of snow in the last month.
> >
> > I tried, but did not found where the value is inserted into the
dialog.
> >
>
> One of the problems will probably be in GuiHSpace::dialogToParams().
> That is where the values in the dialog get passed to back to LyX. I
> suspect something goes wrong here:
>
> else if (item == "custom") {
> params.kind = keepCB->isChecked() ?
> InsetSpaceParams::CUSTOM_PROTECTED :
> InsetSpaceParams::CUSTOM;
> params.length = GlueLength(widgetsToLength(valueLE, unitCO));
> }
>
> In particular, with widgetsToLength.
Unfortunately not. The valueLE already is set wrong at
/usr/src/lyx/lyx-git/src/frontends/qt4/qt_helpers.cpp:100
#gdb p fromqstr(length)
$4 = {
static npos = <optimized out>,
_M_dataplus = {
<std::allocator<char>> = {
<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
members of std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::_Alloc_hider:
_M_p = 0x1d42618 "1.3e+06sp"
}
}
# gdb p combo->currentLengthItem()
$5 = lyx::Length::CM
It should have been "1.3e+06" and lyx::Length::SP
OK, that's progress.
I wonder if the dialog itself is passing the wrong value?
Richard