mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Disable OUTLINE functions when min or max toclevel is reached
This commit is contained in:
parent
2b33da5944
commit
8e619462e1
12
src/Text.cpp
12
src/Text.cpp
@ -6901,10 +6901,18 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
|
||||
case LFUN_OUTLINE_UP:
|
||||
case LFUN_OUTLINE_DOWN:
|
||||
case LFUN_OUTLINE_IN:
|
||||
case LFUN_OUTLINE_OUT:
|
||||
enable = cur.text()->getTocLevel(cur.pit()) != Layout::NOT_IN_TOC;
|
||||
break;
|
||||
case LFUN_OUTLINE_IN:
|
||||
enable = cur.text()->getTocLevel(cur.pit()) != Layout::NOT_IN_TOC
|
||||
&& cur.text()->getTocLevel(cur.pit()) !=
|
||||
cur.buffer()->params().documentClass().max_toclevel();
|
||||
break;
|
||||
case LFUN_OUTLINE_OUT:
|
||||
enable = cur.text()->getTocLevel(cur.pit()) != Layout::NOT_IN_TOC
|
||||
&& cur.text()->getTocLevel(cur.pit()) !=
|
||||
cur.buffer()->params().documentClass().min_toclevel();
|
||||
break;
|
||||
|
||||
case LFUN_NEWLINE_INSERT:
|
||||
// LaTeX restrictions (labels or empty par)
|
||||
|
Loading…
Reference in New Issue
Block a user