Toggle properly toolbar icons that set layout of a paragraph.

Fixes bug #9463.
This commit is contained in:
Jean-Marc Lasgouttes 2015-03-17 16:40:55 +01:00
parent 8aa2d6b184
commit ba0b847040

View File

@ -3014,9 +3014,17 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
enable = theSpellChecker();
break;
case LFUN_LAYOUT:
case LFUN_LAYOUT: {
enable = !cur.inset().forcePlainLayout();
docstring layout = cmd.argument();
if (layout.empty()) {
DocumentClass const & tclass = cur.buffer()->params().documentClass();
layout = tclass.defaultLayoutName();
}
flag.setOnOff(layout == cur.paragraph().layout().name());
break;
}
case LFUN_ENVIRONMENT_SPLIT: {
if (cmd.argument() == "outer") {