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 a1735d5f25
commit 713d83bf34
2 changed files with 12 additions and 1 deletions

View File

@ -2936,9 +2936,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: {
// FIXME This hardcoding is bad

View File

@ -41,6 +41,9 @@ What's new
* USER INTERFACE
- The icons for Standard, Itemize and Enumerate layouts are now
toggled properly (bug 9463).
- support for the math commands \lvert, \rvert, \lVert, and \rVert (bug 3538).
- Fix some missing symbols in math completer.