mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 01:08:45 +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;
|
||||
}
|
||||
|
||||
case LFUN_INSET_DISSOLVE:
|
||||
needsUpdate |= dissolveInset(cur);
|
||||
case LFUN_INSET_DISSOLVE: {
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
// 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: {
|
||||
Inset & inset = cur.inset();
|
||||
@ -2158,8 +2178,10 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
enable = cur.inset().lyxCode() == FLEX_CODE
|
||||
&& il.lyxtype() == type;
|
||||
} else {
|
||||
enable = !isMainText(cur.bv().buffer())
|
||||
&& cur.inset().nargs() == 1;
|
||||
enable = ((!isMainText(cur.bv().buffer())
|
||||
&& cur.inset().nargs() == 1)
|
||||
|| (cur.nextInset()
|
||||
&& cur.nextInset()->nargs() == 1));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -80,6 +80,9 @@ What's new
|
||||
|
||||
- Reflect external material template using Instant Preview in the dialog for
|
||||
scaling property (bug 5628).
|
||||
|
||||
- Enable "dissolve" item in context menus of collapsable insets (bug 4985).
|
||||
|
||||
|
||||
* DOCUMENTATION AND LOCALIZATION
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user