mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix crash with LFUN_LAYOUT with multicell selection
This lfun (like several others) does not work with multicell selection. Disable the lfun in this this case for now, until a nice solution is found. Fixes bug #12530.
This commit is contained in:
parent
441b0eab23
commit
e6f5f428d7
@ -162,6 +162,7 @@ void Text::setInsetFont(BufferView const & bv, pit_type pit,
|
|||||||
void Text::setLayout(pit_type start, pit_type end,
|
void Text::setLayout(pit_type start, pit_type end,
|
||||||
docstring const & layout)
|
docstring const & layout)
|
||||||
{
|
{
|
||||||
|
// FIXME: make this work in multicell selection case
|
||||||
LASSERT(start != end, return);
|
LASSERT(start != end, return);
|
||||||
|
|
||||||
Buffer const & buffer = owner_->buffer();
|
Buffer const & buffer = owner_->buffer();
|
||||||
|
@ -3575,8 +3575,10 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
docstring const req_layout = ignoreautonests ? from_utf8(cmd.getArg(0)) : cmd.argument();
|
docstring const req_layout = ignoreautonests ? from_utf8(cmd.getArg(0)) : cmd.argument();
|
||||||
docstring const layout = resolveLayout(req_layout, cur);
|
docstring const layout = resolveLayout(req_layout, cur);
|
||||||
|
|
||||||
enable = !owner_->forcePlainLayout() && !layout.empty();
|
// FIXME: make this work in multicell selection case
|
||||||
status.setOnOff(!owner_->forcePlainLayout() && isAlreadyLayout(layout, cur));
|
enable = !owner_->forcePlainLayout() && !layout.empty() && !cur.selIsMultiCell();
|
||||||
|
status.setOnOff(!owner_->forcePlainLayout() && !cur.selIsMultiCell()
|
||||||
|
&& isAlreadyLayout(layout, cur));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user