+2003-10-25 Martin Vermeer <martin.vermeer@hut.fi>
+
+ * MenuBackend.C:
+ * lyxfunc.C: fix (at least partly) the problems
+ with the Nav menu and headers inside branch insets
+ reported by Kayvan
+
2003-10-24 Alfredo Braunstein <abraunst@libero.it>
* paragraph.C (getChar): add strong asserts
string label(4 * max(0, toc_list[i].depth - depth),' ');
label += limit_string_length(toc_list[i].str);
if (toc_list[i].depth == depth
- && ++shortcut_count <= 9) {
- label += '|' + tostr(shortcut_count);
+ && shortcut_count < 9) {
+ if (label.find(tostr(shortcut_count + 1)) != string::npos)
+ label += '|' + tostr(++shortcut_count);
}
tomenu.add(MenuItem(MenuItem::Command, label,
FuncRequest(toc_list[i].action())));
string label(4 * max(0, toc_list[pos].depth - depth), ' ');
label += limit_string_length(toc_list[pos].str);
if (toc_list[pos].depth == depth &&
- ++shortcut_count <= 9)
- label += '|' + tostr(shortcut_count);
-
+ shortcut_count < 9) {
+ if (label.find(tostr(shortcut_count + 1)) != string::npos)
+ label += '|' + tostr(++shortcut_count);
+ }
if (new_pos == pos + 1) {
tomenu.add(MenuItem(MenuItem::Command,
label, FuncRequest(toc_list[pos].action())));
// solution, we consider only the first action of the sequence
if (ev.action == LFUN_SEQUENCE) {
// argument contains ';'-terminated commands
-#warning LyXAction arguements not handled here.
+#warning LyXAction arguments not handled here.
flag = getStatus(FuncRequest(lyxaction.lookupFunc(token(ev.argument, ';', 0))));
}
if (view()->theLockingInset())
view()->unlockInset(view()->theLockingInset());
+
+ LyXText * lt = view()->getLyXText();
if (par->inInset()) {
FuncRequest cmd(view(), LFUN_INSET_EDIT, "left");
par->inInset()->dispatch(cmd);
+ lt = par->inInset()->getLyXText(view());
}
+
// Set the cursor
- view()->getLyXText()->setCursor(par.pit(), 0);
+ lt->setCursor(par.pit(), 0);
view()->switchKeyMap();
owner->view_state_changed();