On 11/09/2010 18:11, Uwe Stöhr wrote:
>>> - there should be some implicit value in boxes, which are
generally sensible
>>> (best would be such values, which would repeat the behaviour
of 1.6
>>> version of horizontal line).
>>
>> I don't understand. The default values when inserting a horizontal
line are those of the old
>> \lyxline.
>
> I don't see any default value coded in the widget...
I have in Text3.cpp this code:
case LFUN_LINE_INSERT: {
InsetCommandParams p(LINE_CODE);
p["offset"] = from_ascii(".5ex");
p["width"] = from_ascii("100col%");
p["height"] = from_ascii("1pt");
string const data = InsetCommand::params2string("line", p);
if (cmd.argument().empty()) {
bv->showDialog("line", data);
} else {
FuncRequest fr(LFUN_INSET_INSERT, data);
dispatch(cur, fr);
}
break;
}
So when inserting a line, the dialog is opened with these values. This
worked correctly before you transformed my GuiLine to InsetWidgets.
As you can see, you have two LFUN that does the same thing...
Can I remove this code now
Yes but more than that LFUN_LINE_INSERT should be removed.
or do you have to transmom this also from InsetCommandParams to
InsetWidgets?
InsetCommandParams is just a set of parameters...
Abdel.