mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-14 01:22:33 +00:00
* Text3.cpp:
- enable LFUN_INSET_DISSOLVE for insets at cursor (bug 4985). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@27946 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
690765c8a7
commit
74e1ca54c4
@ -859,9 +859,29 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case LFUN_INSET_DISSOLVE:
|
case LFUN_INSET_DISSOLVE: {
|
||||||
needsUpdate |= dissolveInset(cur);
|
// first, try if there's an inset at cursor
|
||||||
|
// FIXME: this first part should be moved to
|
||||||
|
// a LFUN_NEXT_INSET_DISSOLVE, or be called via
|
||||||
|
// some generic "next-inset inset-dissolve"
|
||||||
|
Inset * inset = cur.nextInset();
|
||||||
|
if (inset && inset->isActive()) {
|
||||||
|
Cursor tmpcur = cur;
|
||||||
|
tmpcur.pushBackward(*inset);
|
||||||
|
inset->dispatch(tmpcur, cmd);
|
||||||
|
if (tmpcur.result().dispatched()) {
|
||||||
|
cur.dispatched();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if it did not work, try the underlying inset
|
||||||
|
if (dissolveInset(cur)) {
|
||||||
|
needsUpdate = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// if it did not work, do nothing.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case LFUN_INSET_SETTINGS: {
|
case LFUN_INSET_SETTINGS: {
|
||||||
Inset & inset = cur.inset();
|
Inset & inset = cur.inset();
|
||||||
@ -2158,8 +2178,10 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
enable = cur.inset().lyxCode() == FLEX_CODE
|
enable = cur.inset().lyxCode() == FLEX_CODE
|
||||||
&& il.lyxtype() == type;
|
&& il.lyxtype() == type;
|
||||||
} else {
|
} else {
|
||||||
enable = !isMainText(cur.bv().buffer())
|
enable = ((!isMainText(cur.bv().buffer())
|
||||||
&& cur.inset().nargs() == 1;
|
&& cur.inset().nargs() == 1)
|
||||||
|
|| (cur.nextInset()
|
||||||
|
&& cur.nextInset()->nargs() == 1));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -81,6 +81,9 @@ What's new
|
|||||||
- Reflect external material template using Instant Preview in the dialog for
|
- Reflect external material template using Instant Preview in the dialog for
|
||||||
scaling property (bug 5628).
|
scaling property (bug 5628).
|
||||||
|
|
||||||
|
- Enable "dissolve" item in context menus of collapsable insets (bug 4985).
|
||||||
|
|
||||||
|
|
||||||
* DOCUMENTATION AND LOCALIZATION
|
* DOCUMENTATION AND LOCALIZATION
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user