mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
GuiBox.cpp, InsetBox.cpp: fix some wrong logic
- InsetBox.cpp: a framebox without inner box and without a width is \fbox a framebox with inner box is also \fbox a framebox without inner box and with width is \framebox - GuiBox.cpp: the width checkbox must be checked if there is width
This commit is contained in:
parent
92a2e17903
commit
427aeff90f
@ -128,7 +128,7 @@ void GuiBox::on_innerBoxCO_activated(int /* index */)
|
||||
// the width can only be selected for makebox or framebox
|
||||
widthCB->setEnabled(itype == "makebox"
|
||||
|| (outer == "Boxed" && itype == "none"));
|
||||
widthCB->setChecked(itype != "none" && !widthCB->isEnabled());
|
||||
widthCB->setChecked(!widthED->text().isEmpty());
|
||||
// except for frameless and boxed, the width cannot be specified if
|
||||
// there is no inner box
|
||||
bool const width_enabled =
|
||||
@ -313,8 +313,7 @@ void GuiBox::paramsToDialog(Inset const * inset)
|
||||
lengthToWidgets(widthED, widthUnitsLC,
|
||||
params.width, default_unit);
|
||||
} else {
|
||||
if (widthCB->isEnabled())
|
||||
widthCB->setChecked(true);
|
||||
widthCB->setChecked(true);
|
||||
lengthToWidgets(widthED, widthUnitsLC,
|
||||
params.width, default_unit);
|
||||
QString const special = toqstr(params.special);
|
||||
|
@ -317,9 +317,9 @@ void InsetBox::latex(otexstream & os, OutputParams const & runparams) const
|
||||
os << "\\begin{framed}%\n";
|
||||
break;
|
||||
case Boxed:
|
||||
if (width_string.empty()) {
|
||||
os << "\\framebox";
|
||||
if (!width_string.empty()) {
|
||||
if (!params_.inner_box) {
|
||||
os << "\\framebox";
|
||||
// Special widths, see usrguide sec. 3.5
|
||||
// FIXME UNICODE
|
||||
if (params_.special != "none") {
|
||||
@ -331,7 +331,8 @@ void InsetBox::latex(otexstream & os, OutputParams const & runparams) const
|
||||
<< ']';
|
||||
if (params_.hor_pos != 'c')
|
||||
os << "[" << params_.hor_pos << "]";
|
||||
}
|
||||
} else
|
||||
os << "\\fbox";
|
||||
} else
|
||||
os << "\\fbox";
|
||||
os << "{";
|
||||
|
Loading…
Reference in New Issue
Block a user