commit 8e619462e1040cfde307c627c2a93134a1bd34c5
Author: Juergen Spitzmueller <[email protected]>
Date: Sat Oct 21 13:49:50 2023 +0200
Disable OUTLINE functions when min or max toclevel is reached
---
src/Text.cpp | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/src/Text.cpp b/src/Text.cpp
index 820b755..45033a3 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -6901,9 +6901,17 @@ bool Text::getStatus(Cursor & cur, FuncRequest const &
cmd,
case LFUN_OUTLINE_UP:
case LFUN_OUTLINE_DOWN:
+ 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;
+ 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:
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs