mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Dissolve CharStyle initial implementation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20944 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
589170bd4b
commit
1ecd2189f2
@ -140,6 +140,7 @@ Menuset
|
||||
End
|
||||
|
||||
Menu "edit_textstyles"
|
||||
Item "Dissolve CharStyle" "inset-dissolve charstyle"
|
||||
CharStyles
|
||||
Elements
|
||||
Separator
|
||||
|
@ -1840,7 +1840,13 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
break;
|
||||
|
||||
case LFUN_INSET_DISSOLVE:
|
||||
enable = !isMainText(cur.bv().buffer()) && cur.inset().nargs() == 1;
|
||||
if (!cmd.argument().empty()) {
|
||||
InsetLayout il = cur.inset().getLayout(cur.buffer().params());
|
||||
enable = (cur.inset().lyxCode() == FLEX_CODE)
|
||||
&& (il.lyxtype == to_utf8(cmd.argument()));
|
||||
} else
|
||||
enable = !isMainText(cur.bv().buffer())
|
||||
&& cur.inset().nargs() == 1;
|
||||
break;
|
||||
|
||||
case LFUN_CHANGE_ACCEPT:
|
||||
|
@ -40,6 +40,8 @@ public:
|
||||
InsetFlex(BufferParams const &, InsetLayout);
|
||||
///
|
||||
docstring name() const { return from_ascii("Flex"); }
|
||||
///
|
||||
InsetLayout const & getLayout(BufferParams const &) const { return layout_; }
|
||||
/// Is this character style defined in the document's textclass?
|
||||
/// May be wrong after textclass change or paste from another document
|
||||
bool undefined() const;
|
||||
|
Loading…
Reference in New Issue
Block a user